10% top-7

Code Review | TheTop7 - Custom Top 7 Lists

WordPress plugin TheTop7 - Custom Top 7 Lists scored10%from 54 tests.

About plugin

  • Plugin page: top-7
  • Plugin version: 1.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-3.8
  • WordPress version: 6.3.1
  • First release: Jan 29, 2013
  • Latest release: Dec 20, 2013
  • Number of updates: 24
  • Update frequency: every 78.6 days
  • Top authors: benhallbenhall (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,860 total downloads

Benchmarks

Plugin footprint 58% 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
  • The plugin did not install without errors
    • > Parse error in wp-content/plugins/top-7/index.php+172
    syntax error, unexpected end of file

Server metrics [RAM: ▼0.01MB] [CPU: ▼10.29ms] Passed 4 tests

A check of server-side resources used by TheTop7 - Custom Top 7 Lists
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.17 ▼2.10
Dashboard /wp-admin3.31 ▼0.0446.30 ▼19.16
Posts /wp-admin/edit.php3.36 ▲0.0050.67 ▼3.89
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.19 ▼15.23
Media Library /wp-admin/upload.php3.23 ▲0.0034.36 ▼2.87

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for TheTop7 - Custom Top 7 Lists
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.26 ▼0.992.01 ▲0.3143.13 ▼8.20
Dashboard /wp-admin2,206 ▲185.85 ▼0.0295.86 ▼7.6140.73 ▼2.31
Posts /wp-admin/edit.php2,089 ▼31.99 ▼0.0236.48 ▼5.0331.27 ▼4.01
Add New Post /wp-admin/post-new.php1,542 ▲2318.43 ▼4.71603.52 ▼84.1556.85 ▼0.55
Media Library /wp-admin/upload.php1,391 ▲64.29 ▲0.0995.81 ▼7.2744.09 ▲2.10

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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 fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/top-7/index.php on line 172

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: user voting, user content, top 10 lists

top-7/index.php 92% from 13 tests

The main PHP script in "TheTop7 - Custom Top 7 Lists" version 1.3.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("top-7.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin254 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP12239111
HTML1202108
JavaScript1122835

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
image.png1.12KB0.24KB▼ 78.26%