10% statcounter-popular-posts

Code Review | StatCounter Popular Posts

WordPress plugin StatCounter Popular Posts scored 10% from 54 tests.

About plugin

  • Plugin page: statcounter-popul...
  • Plugin version: 0.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4.1
  • WordPress version: 5.8.1
  • First release: Jun 24, 2014
  • Latest release: Jan 9, 2016
  • Number of updates: 17
  • Update frequency: every 33.2 days
  • Top authors: subins2000 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active / 1,929 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/statcounter-popular-posts/sc-popular-posts.php+228
    Function create_function() is deprecated

Server metrics [RAM: ▼1.29MB] [CPU: ▼184.22ms] Passed 4 tests

A check of server-side resources used by StatCounter Popular Posts
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.34 ▼0.386.03 ▼18.18
Dashboard /wp-admin2.36 ▼0.706.96 ▼36.03
Posts /wp-admin/edit.php2.36 ▼0.757.57 ▼36.46
Add New Post /wp-admin/post-new.php2.36 ▼3.086.97 ▼636.14
Media Library /wp-admin/upload.php2.36 ▼0.646.49 ▼28.24
StatCounter Popular Posts /wp-admin/options-general.php?page=SCPP_admin2.366.73

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 1 new option
New WordPress options
widget_spp_widget

Browser metrics Passed 4 tests

An overview of browser requirements for StatCounter Popular Posts
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲8815.83 ▲0.218.33 ▼2.3647.83 ▲1.19
Dashboard /wp-admin2,975 ▲446.01 ▼0.15133.41 ▼8.04117.44 ▲2.11
Posts /wp-admin/edit.php2,744 ▲52.72 ▼0.0065.38 ▲2.3886.18 ▼8.10
Add New Post /wp-admin/post-new.php1,875 ▲37719.14 ▲0.33377.43 ▲0.50107.84 ▲2.48
Media Library /wp-admin/upload.php1,815 ▲55.10 ▲0.08139.06 ▼4.69129.83 ▲8.63
StatCounter Popular Posts /wp-admin/options-general.php?page=SCPP_admin1,0772.1054.7672.49

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
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/statcounter-popular-posts/sc-popular-posts.php+228
    Function create_function() is deprecated
  • Zombie WordPress options detected upon uninstall: 1 option
    • widget_spp_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=SCPP_admin
    • > Deprecated in wp-content/plugins/statcounter-popular-posts/sc-popular-posts.php+228
    Function create_function() is deprecated

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
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/statcounter-popular-posts/sc-popular-posts.php:41

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

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
Attributes that need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === statcounter-popular-posts === )
You can take inspiration from this readme.txt

statcounter-popular-posts/sc-popular-posts.php 92% from 13 tests

The primary PHP file in "StatCounter Popular Posts" version 0.2.2 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("statcounter-popular-posts.php" instead of "sc-popular-posts.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin1,653 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP22232921,455
HTML11193194
Markdown1204

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity118.33
▷ Minimum class complexity26.00
▷ Maximum class complexity198.00
Average method complexity4.78
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods93
▷ Static methods11.08%
▷ Public methods7782.80%
▷ Protected methods1617.20%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants21
▷ Global constants21100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected