84% mtphr-widgets

Code Review | Metaphor Widgets

WordPress plugin Metaphor Widgets scored84%from 54 tests.

About plugin

  • Plugin page: mtphr-widgets
  • Plugin version: 2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-4.9.1
  • WordPress version: 6.3.1
  • First release: Feb 25, 2013
  • Latest release: Aug 20, 2020
  • Number of updates: 86
  • Update frequency: every 31.8 days
  • Top authors: metaphorcreations (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

600+ active /23,377 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.41MB] [CPU: ▼7.25ms] Passed 4 tests

Analyzing server-side resources used by Metaphor Widgets
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.87 ▲0.4147.53 ▲3.51
Dashboard /wp-admin3.77 ▲0.4353.03 ▼12.31
Posts /wp-admin/edit.php3.83 ▲0.4753.01 ▲0.86
Add New Post /wp-admin/post-new.php6.29 ▲0.4186.39 ▼20.56
Media Library /wp-admin/upload.php3.62 ▲0.3937.69 ▲3.03

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 40 new files
Database: no new tables, 13 new options
New WordPress options
widget_mtphr-collapse
db_upgraded
widget_recent-posts
widget_mtphr-comments
widget_mtphr-post-navigation
widget_mtphr-social
widget_mtphr-contact
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
...

Browser metrics Passed 4 tests

A check of browser resources used by Metaphor Widgets
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,049 ▲31415.13 ▲0.786.20 ▲4.5837.86 ▼5.89
Dashboard /wp-admin2,341 ▲1616.20 ▲0.51120.71 ▲29.2343.49 ▼1.63
Posts /wp-admin/edit.php2,272 ▲1723.36 ▲1.3256.27 ▲15.6837.10 ▼1.26
Add New Post /wp-admin/post-new.php1,544 ▲1823.22 ▲0.16641.90 ▼33.6536.12 ▼18.00
Media Library /wp-admin/upload.php1,409 ▲64.17 ▲0.0184.44 ▼15.8342.94 ▼2.83

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 13 options in the database
    • widget_mtphr-collapse
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_mtphr-contact
    • db_upgraded
    • widget_theysaidso_widget
    • widget_mtphr-tabbed-posts
    • widget_recent-posts
    • can_compress_scripts
    • widget_mtphr-posts
    • ...

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 16× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/mtphr-widgets/includes/tabbed-posts.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mtphr-widgets/includes/admin/filters.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/mtphr-widgets/includes/comments.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mtphr-widgets/includes/admin/scripts.php:33
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/mtphr-widgets/includes/collapse.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/mtphr-widgets/mtphr-widgets.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mtphr-widgets/includes/functions.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/mtphr-widgets/includes/filters.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/mtphr-widgets/includes/twitter.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/mtphr-widgets/includes/contact.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

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: Please take inspiration from this readme.txt

mtphr-widgets/mtphr-widgets.php Passed 13 tests

"Metaphor Widgets" version 2.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
108 characters long description:
Custom widgets pack. Includes recent posts, recent comments, contact, twitter, social, & navigation widgets.

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
Good job! No executable or dangerous file extensions detected4,903 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP187014852,426
CSS46277917
HTML140553
PO File2212515480
JavaScript5133159457
SVG11070

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity17.50
▷ Minimum class complexity10.00
▷ Maximum class complexity40.00
Average method complexity5.12
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods32
▷ Static methods00.00%
▷ Public methods32100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions65
▷ Named functions65100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin