74% toplist

Code Review | TOPlist

WordPress plugin TOPlist scored 74% from 54 tests.

About plugin

  • Plugin page: toplist
  • Plugin version: 5.1.2
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.7.2
  • WordPress version: 5.8.1
  • First release: May 20, 2019
  • Latest release: Jul 14, 2021
  • Number of updates: 9
  • Update frequency: every 87.3 days
  • Top authors: toplist (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active / 1,380 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼1.47MB] [CPU: ▼187.13ms] Passed 4 tests

Analyzing server-side resources used by TOPlist
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.16 ▼0.6713.23 ▼23.85
Dashboard /wp-admin2.18 ▼0.8710.59 ▼39.30
Posts /wp-admin/edit.php2.18 ▼0.9212.88 ▼32.94
Add New Post /wp-admin/post-new.php2.18 ▼3.2510.83 ▼652.43
Media Library /wp-admin/upload.php2.18 ▼0.8311.48 ▼22.87

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 2 new options
New WordPress options
widget_toplist_cz
toplist_cz_version

Browser metrics Passed 4 tests

Checking browser requirements for TOPlist
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,681 ▲8515.94 ▲0.358.99 ▼3.9346.66 ▼0.66
Dashboard /wp-admin2,972 ▲386.02 ▲0.05141.95 ▼7.77105.36 ▲4.48
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0168.41 ▼1.9293.46 ▼0.66
Add New Post /wp-admin/post-new.php1,683 ▲17918.72 ▲0.10400.80 ▲4.01105.67 ▼2.72
Media Library /wp-admin/upload.php1,810 ▲35.00 ▼0.05151.94 ▼7.99109.78 ▼6.66

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/toplist/toplist.php+23
    Trying to access array offset on value of type bool
  • This plugin does not fully uninstall, leaving 2 options in the database
    • toplist_cz_version
    • widget_toplist_cz

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in wp-content/plugins/toplist/toplist.php on line 12
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHWPINC/class-http.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/toplist/toplist.php on line 12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/toplist/toplist.php:14
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/toplist/toplist.php on line 12
    • > PHP Warning
      include_once(ABSPATHWPINC/class-http.php): failed to open stream: No such file or directory in wp-content/plugins/toplist/toplist.php on line 12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: toplist, statistics, analytics, web, widget...

toplist/toplist.php Passed 13 tests

The principal PHP file in "TOPlist" v. 5.1.2 is loaded by WordPress automatically on each request
89 characters long description:
Widget for easy integration of TOPlist.cz, popular Czech website visit statistics server.

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
There were no executable files found in this plugin1,136 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP18121723
JavaScript33339269
CSS2321144

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity136.00
▷ Minimum class complexity136.00
▷ Maximum class complexity136.00
Average method complexity5.09
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods33
▷ Static methods515.15%
▷ Public methods1236.36%
▷ Protected methods00.00%
▷ Private methods2163.64%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin