10% toplistcz

Code Review | TopList.cz

WordPress plugin TopList.cz scored10%from 54 tests.

About plugin

  • Plugin page: toplistcz
  • Plugin version: 4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.7
  • WordPress version: 6.3.1
  • First release: Mar 25, 2009
  • Latest release: Mar 5, 2017
  • Number of updates: 75
  • Update frequency: every 38.7 days
  • Top authors: honza.skypala (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

700+ active /12,426 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/toplistcz/toplist.php+843
    Function create_function() is deprecated

Server metrics [RAM: ▼1.57MB] [CPU: ▼57.14ms] Passed 4 tests

An overview of server-side resources used by TopList.cz
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.41 ▼1.056.07 ▼43.11
Dashboard /wp-admin2.43 ▼0.877.30 ▼50.31
Posts /wp-admin/edit.php2.44 ▼0.927.77 ▼43.60
Add New Post /wp-admin/post-new.php2.43 ▼3.456.69 ▼91.54
Media Library /wp-admin/upload.php2.43 ▼0.796.50 ▼29.93

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 8 new options
New WordPress options
widget_toplist_cz
theysaidso_admin_options
can_compress_scripts
toplist_cz_version
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for TopList.cz
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.69 ▲0.531.61 ▼0.1041.76 ▼1.45
Dashboard /wp-admin2,200 ▲235.53 ▼0.0793.05 ▼3.8742.22 ▲5.28
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0236.33 ▼6.8436.91 ▼3.72
Add New Post /wp-admin/post-new.php1,526 ▼023.19 ▲0.14669.76 ▼40.9354.50 ▼4.44
Media Library /wp-admin/upload.php1,397 ▼64.19 ▲0.0896.85 ▼27.8247.22 ▼5.65

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/toplistcz/toplist.php+843
    Function create_function() is deprecated
  • This plugin does not fully uninstall, leaving 8 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • toplist_cz_version
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_toplist_cz

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      include_once(ABSPATHWPINC/class-http.php): failed to open stream: No such file or directory in wp-content/plugins/toplistcz/toplist.php on line 13
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/toplistcz/toplist.php on line 13
    • > PHP Warning
      Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in wp-content/plugins/toplistcz/toplist.php on line 13
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHWPINC/class-http.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/toplistcz/toplist.php on line 13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/toplistcz/toplist.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: widget, pages, analytics, toplist, statistics...

toplistcz/toplist.php 92% from 13 tests

This is the main PHP file of "TopList.cz" version 4.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("toplistcz.php" instead of "toplist.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected1,234 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP18123741
JavaScript33338270
CSS2321144
PO File1262579

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity147.00
▷ Minimum class complexity147.00
▷ Maximum class complexity147.00
Average method complexity5.42
▷ 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%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin