10% klout-score-badge-with-klout-api-v2

Code Review | Klout score Widget

WordPress plugin Klout score Widget scored10%from 54 tests.

About plugin

  • Plugin page: klout-score-badge...
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4.2
  • WordPress version: 6.3.1
  • First release: Oct 19, 2012
  • Latest release: Jul 9, 2014
  • Number of updates: 31
  • Update frequency: every 20.3 days
  • Top authors: ghostichou (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

10+ active /2,565 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/klout-score-badge-with-klout-api-v2/kscore.php+16
    Methods with the same name as their class will not be constructors in a future version of PHP; kscore_widget has a deprecated constructor

Server metrics [RAM: ▼1.71MB] [CPU: ▼51.62ms] Passed 4 tests

An overview of server-side resources used by Klout score Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.1811.37 ▼35.42
Dashboard /wp-admin2.29 ▼1.0111.84 ▼40.92
Posts /wp-admin/edit.php2.29 ▼1.0611.82 ▼44.19
Add New Post /wp-admin/post-new.php2.29 ▼3.5910.06 ▼85.93
Media Library /wp-admin/upload.php2.29 ▼0.9410.71 ▼22.59

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_widget-kscore
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Klout score Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.27 ▼0.081.79 ▼0.2252.80 ▲2.30
Dashboard /wp-admin2,192 ▲155.66 ▲0.08106.84 ▲7.4146.97 ▲3.34
Posts /wp-admin/edit.php2,103 ▲31.98 ▲0.0148.37 ▲8.4139.12 ▲2.36
Add New Post /wp-admin/post-new.php1,526 ▼023.58 ▲0.48699.72 ▲40.8051.82 ▼0.12
Media Library /wp-admin/upload.php1,394 ▼94.18 ▲0.04100.59 ▼12.6847.80 ▼0.82

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in kscore_widget is deprecated since version 4.3.0! Use __construct() instead.
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_widget-kscore
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/klout-score-badge-with-klout-api-v2/kscore.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Plugin Name: Please specify the plugin name on the first line ( === klout-score-badge-with-klout-api-v2 === )
The official readme.txt is a good inspiration

klout-score-badge-with-klout-api-v2/kscore.php 92% from 13 tests

The principal PHP file in "Klout score Widget" v. 1.4 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("klout-score-badge-with-klout-api-v2.php" instead of "kscore.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin96 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1371596

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.05
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/klout-logo.png11.20KB4.89KB▼ 56.38%