84% heropress-recent-essays-widget

Code Review | HeroPress Recent Essay Widget

WordPress plugin HeroPress Recent Essay Widget scored84%from 54 tests.

About plugin

  • Plugin page: heropress-recent-...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.3
  • WordPress version: 6.3.1
  • First release: Aug 25, 2015
  • Latest release: Aug 27, 2015
  • Number of updates: 8
  • Update frequency: every 169.6 days
  • Top authors: topher1kenobe (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,449 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.04MB] [CPU: ▲0.76ms] Passed 4 tests

A check of server-side resources used by HeroPress Recent Essay Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0442.91 ▲1.43
Dashboard /wp-admin3.34 ▲0.0444.23 ▲1.69
Posts /wp-admin/edit.php3.40 ▲0.0447.90 ▼0.50
Add New Post /wp-admin/post-new.php5.93 ▲0.0499.70 ▲9.41
Media Library /wp-admin/upload.php3.27 ▲0.0436.33 ▲0.44

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_heropress-recent-essays-widget
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

HeroPress Recent Essay Widget: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.33 ▼1.051.78 ▼0.3144.60 ▼3.93
Dashboard /wp-admin2,209 ▲545.85 ▲0.16104.05 ▲2.2944.43 ▲0.75
Posts /wp-admin/edit.php2,089 ▼01.97 ▼0.0639.17 ▲0.6536.05 ▼1.57
Add New Post /wp-admin/post-new.php1,537 ▲1823.12 ▼0.23673.33 ▼19.8369.40 ▲17.07
Media Library /wp-admin/upload.php1,388 ▼04.22 ▲0.0594.76 ▼13.7940.73 ▼7.26

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_heropress-recent-essays-widget
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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 fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/heropress-recent-essays-widget/heropress-recent-essays-widget.php:29

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed: Please take inspiration from this readme.txt

heropress-recent-essays-widget/heropress-recent-essays-widget.php Passed 13 tests

"HeroPress Recent Essay Widget" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
66 characters long description:
Creates a widget which shows the recent essays from HeroPress.com.

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
Everything looks great! No dangerous files found in this plugin147 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP168126147

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods466.67%
▷ Protected methods00.00%
▷ Private methods233.33%
Functions1
▷ Named functions1100.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 images were found in this plugin