10% tentblogger-simple-top-posts

Code Review | TentBlogger Simple Top Posts

WordPress plugin TentBlogger Simple Top Posts scored 10% from 54 tests.

About plugin

  • Plugin page: tentblogger-simpl...
  • Plugin version: 2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.3
  • WordPress version: 5.8.1
  • First release: May 6, 2011
  • Latest release: Mar 5, 2013
  • Number of updates: 13
  • Update frequency: every 51.5 days
  • Top authors: tentblogger (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 4,556 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/tentblogger-simple-top-posts/tentblogger-simple-top-posts.php+29
    Methods with the same name as their class will not be constructors in a future version of PHP; TentBlogger_Top_Posts has a deprecated constructor

Server metrics [RAM: ▼1.84MB] [CPU: ▼196.31ms] Passed 4 tests

A check of server-side resources used by TentBlogger Simple Top Posts
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /1.79 ▼0.934.82 ▼18.87
Dashboard /wp-admin1.81 ▼1.245.80 ▼41.68
Posts /wp-admin/edit.php1.81 ▼1.305.20 ▼40.82
Add New Post /wp-admin/post-new.php1.81 ▼3.625.30 ▼672.88
Media Library /wp-admin/upload.php1.81 ▼1.194.77 ▼29.85

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 1 new option
New WordPress options
widget_tentblogger-top-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for TentBlogger Simple Top Posts
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲11215.87 ▼0.149.49 ▼0.4347.67 ▼1.65
Dashboard /wp-admin2,975 ▲386.10 ▲0.11150.92 ▲12.31111.11 ▼0.13
Posts /wp-admin/edit.php2,741 ▲22.72 ▲0.0165.74 ▼1.3187.20 ▲1.58
Add New Post /wp-admin/post-new.php1,674 ▲7018.88 ▲0.01396.32 ▲0.77106.89 ▼1.72
Media Library /wp-admin/upload.php1,809 ▲25.02 ▼0.01161.09 ▼5.40123.45 ▲3.05

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/tentblogger-simple-top-posts/tentblogger-simple-top-posts.php+29
    Methods with the same name as their class will not be constructors in a future version of PHP; TentBlogger_Top_Posts has a deprecated constructor
  • This plugin does not fully uninstall, leaving 1 option in the database
    • widget_tentblogger-top-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/tentblogger-simple-top-posts/views/widget.php
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/tentblogger-simple-top-posts/views/widget.php on line 12
    • > PHP Notice
      Undefined variable: posts in wp-content/plugins/tentblogger-simple-top-posts/views/widget.php on line 12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/tentblogger-simple-top-posts/tentblogger-simple-top-posts.php:29
    • > PHP Notice
      Undefined variable: widget_title in wp-content/plugins/tentblogger-simple-top-posts/views/widget.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/tentblogger-simple-top-posts/views/admin.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: Please add an image for screenshot #1 (TentBlogger's Top Posts)
You can take inspiration from this readme.txt

tentblogger-simple-top-posts/tentblogger-simple-top-posts.php Passed 13 tests

The main file in "TentBlogger Simple Top Posts" v. 2.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
98 characters long description:
Show the top commented posts per Week, Month, or All Time! No setup needed. Widget-ready. Awesome.

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
No dangerous file extensions were detected211 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP35378160
PO File110935
CSS20014
JavaScript1102

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods450.00%
▷ Protected methods00.00%
▷ Private methods450.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png5.88KB4.11KB▼ 30.12%