84% mzd-recent-posts

Code Review | MZD Recent Posts

WordPress plugin MZD Recent Posts scored84%from 54 tests.

About plugin

  • Plugin page: mzd-recent-posts
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.0
  • WordPress version: 6.3.1
  • First release: May 20, 2019
  • Latest release: Jun 12, 2022
  • Number of updates: 11
  • Update frequency: every 101.8 days
  • Top authors: mazedulislam27 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /593 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
This plugin's installer ran successfully

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

A check of server-side resources used by MZD Recent Posts
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.78 ▼2.68
Dashboard /wp-admin3.32 ▲0.0147.75 ▼11.56
Posts /wp-admin/edit.php3.37 ▲0.0147.37 ▼2.53
Add New Post /wp-admin/post-new.php5.90 ▲0.0188.94 ▼6.33
Media Library /wp-admin/upload.php3.24 ▲0.0141.17 ▲6.68

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
widget_widget_recent_posts_one
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by MZD Recent Posts
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.27 ▼0.262.01 ▲0.4243.34 ▼1.45
Dashboard /wp-admin2,189 ▲95.57 ▼0.0084.80 ▼3.7745.25 ▲0.62
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0434.87 ▼4.4935.93 ▼2.41
Add New Post /wp-admin/post-new.php1,526 ▼023.18 ▼0.10661.85 ▲9.2951.74 ▲2.77
Media Library /wp-admin/upload.php1,403 ▲94.11 ▼0.16105.84 ▲4.2648.23 ▲3.54

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • widget_widget_recent_posts_one
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'MZD_Custom_Widget' not found in wp-content/plugins/mzd-recent-posts/widgets/recent-posts-one/class-widget-recent-posts-one.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #4 (screenshot-1.png), #5 (screenshot-2.png), #6 (screenshot-3.png)
The official readme.txt is a good inspiration

mzd-recent-posts/mzd-recent-posts.php Passed 13 tests

The main PHP script in "MZD Recent Posts" version 1.0.1 is automatically included on every request by WordPress
54 characters long description:
This plugin includs recent posts support in any themes

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
Success! There were no dangerous files found in this plugin121 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP42029121

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity8.50
▷ Minimum class complexity8.00
▷ Maximum class complexity9.00
Average method complexity3.14
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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