10% klout-score-badge

Code Review | Klout Badge Plugin

WordPress plugin Klout Badge Plugin scored10%from 54 tests.

About plugin

  • Plugin page: klout-score-badge
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0-3.3
  • WordPress version: 6.3.1
  • First release: Apr 19, 2012
  • Latest release: Apr 19, 2012
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: techlineinfo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,677 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/klout-score-badge/kloutbadge.php+70
    Function create_function() is deprecated

Server metrics [RAM: ▼1.97MB] [CPU: ▼53.37ms] Passed 4 tests

An overview of server-side resources used by Klout Badge Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.78 ▼31.25
Dashboard /wp-admin2.05 ▼1.305.10 ▼53.44
Posts /wp-admin/edit.php2.05 ▼1.315.27 ▼42.78
Add New Post /wp-admin/post-new.php2.05 ▼3.845.88 ▼85.99
Media Library /wp-admin/upload.php2.05 ▼1.186.27 ▼23.17

Server storage [IO: ▲0.05MB] [DB: ▲0.00MB] Passed 3 tests

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_kloutbadge
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Klout Badge Plugin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.27 ▼0.081.80 ▼0.0542.67 ▲2.17
Dashboard /wp-admin2,198 ▲185.62 ▼0.0491.88 ▲5.6244.96 ▲4.95
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0439.73 ▲3.9839.74 ▲5.60
Add New Post /wp-admin/post-new.php1,529 ▼523.32 ▲0.26579.11 ▼18.3560.50 ▲11.81
Media Library /wp-admin/upload.php1,391 ▼94.20 ▼0.1797.13 ▼7.8543.13 ▼1.45

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/klout-score-badge/kloutbadge.php+70
    Function create_function() is deprecated
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_kloutbadge
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/klout-score-badge/kloutbadge.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: klout score, klout, klout score badge, klout badge

klout-score-badge/kloutbadge.php 92% from 13 tests

"Klout Badge Plugin" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("klout-score-badge.php" instead of "kloutbadge.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected45 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP162145

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.04
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin