84% top-10-posts

Code Review | Top 10 Posts

WordPress plugin Top 10 Posts scored84%from 54 tests.

About plugin

  • Plugin page: top-10-posts
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.3
  • WordPress version: 6.3.1
  • First release: Dec 30, 2009
  • Latest release: Nov 19, 2019
  • Number of updates: 18
  • Update frequency: every 200.6 days
  • Top authors: rezehnde (61.11%)insistimento (44.44%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /4,151 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Top 10 Posts
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.09 ▼2.31
Dashboard /wp-admin3.31 ▲0.0147.27 ▼8.77
Posts /wp-admin/edit.php3.37 ▲0.0148.40 ▼0.54
Add New Post /wp-admin/post-new.php5.90 ▲0.0198.94 ▼2.46
Media Library /wp-admin/upload.php3.24 ▲0.0137.91 ▼1.82

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Top 10 Posts
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.24 ▼0.031.68 ▼0.7043.01 ▲0.23
Dashboard /wp-admin2,195 ▲155.54 ▼0.1385.24 ▼5.7137.37 ▼4.52
Posts /wp-admin/edit.php2,103 ▲32.02 ▲0.0739.90 ▲4.5736.07 ▼2.36
Add New Post /wp-admin/post-new.php1,526 ▼223.03 ▼0.01649.14 ▼46.7751.42 ▼7.70
Media Library /wp-admin/upload.php1,403 ▲64.21 ▲0.0795.46 ▼15.1442.41 ▼3.58

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/top-10-posts/top-10-posts.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: top posts, top 10, posts, top 10 list

top-10-posts/top-10-posts.php Passed 13 tests

The principal PHP file in "Top 10 Posts" v. 1.2 is loaded by WordPress automatically on each request
55 characters long description:
Show a top 10 list from your popular blog posts easily.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin53 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP17953

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.20
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected