84% wp-mega-menu-recent-posts

Code Review | WP Mega Menu Recent Posts

WordPress plugin WP Mega Menu Recent Posts scored84%from 54 tests.

About plugin

  • Plugin page: wp-mega-menu-rece...
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-5.8.2
  • WordPress version: 6.3.1
  • First release: Nov 28, 2017
  • Latest release: Dec 8, 2021
  • Number of updates: 30
  • Update frequency: every 49.2 days
  • Top authors: krishna121 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,590 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼7.46ms] Passed 4 tests

An overview of server-side resources used by WP Mega Menu Recent Posts
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.04 ▲2.51
Dashboard /wp-admin3.35 ▼0.0045.07 ▼17.85
Posts /wp-admin/edit.php3.40 ▲0.0445.84 ▲0.28
Add New Post /wp-admin/post-new.php5.93 ▲0.0477.72 ▼13.25
Media Library /wp-admin/upload.php3.27 ▲0.0435.04 ▲0.99

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_mega_menu_recent_posts
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Mega Menu Recent Posts
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5613.30 ▼0.991.68 ▼0.3641.55 ▼3.11
Dashboard /wp-admin2,206 ▲184.85 ▼1.16109.95 ▼10.7840.82 ▼2.51
Posts /wp-admin/edit.php2,089 ▲32.01 ▲0.0042.04 ▲5.5036.10 ▲1.09
Add New Post /wp-admin/post-new.php1,533 ▲1423.47 ▲0.34664.62 ▼15.8745.93 ▼7.73
Media Library /wp-admin/upload.php1,388 ▼04.21 ▼0.0193.91 ▼10.5342.56 ▼4.02

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_mega_menu_recent_posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

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 everything seems fine, this is not an exhaustive test

SRP 50% 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
Please fix the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-mega-menu-recent-posts/wp-mega-menu-recent-posts.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-mega-menu-recent-posts/inc/recent_posts_widget.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: There are too many tags (11 tag instead of maximum 10)
The official readme.txt might help

wp-mega-menu-recent-posts/wp-mega-menu-recent-posts.php 92% from 13 tests

This is the main PHP file of "WP Mega Menu Recent Posts" version 1.0.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.2" instead of "2.6")

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
Everything looks great! No dangerous files found in this plugin226 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP23014151
CSS16475

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity4.50
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.70
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.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

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin