84% mtphr-members

Code Review | Metaphor Members

WordPress plugin Metaphor Members scored84%from 54 tests.

About plugin

  • Plugin page: mtphr-members
  • Plugin version: 1.1.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.7
  • WordPress version: 6.3.1
  • First release: Mar 12, 2013
  • Latest release: Dec 8, 2016
  • Number of updates: 46
  • Update frequency: every 29.8 days
  • Top authors: metaphorcreations (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active /10,749 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.24MB] [CPU: ▼8.10ms] Passed 4 tests

This is a short check of server-side resources used by Metaphor Members
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1745.80 ▲11.15
Dashboard /wp-admin3.58 ▲0.2345.05 ▼13.55
Posts /wp-admin/edit.php3.70 ▲0.3444.61 ▼5.00
Add New Post /wp-admin/post-new.php6.19 ▲0.3082.71 ▼16.99
Media Library /wp-admin/upload.php3.51 ▲0.2737.12 ▲3.16
Categories /wp-admin/edit-tags.php?taxonomy=mtphr_member_category&post_type=mtphr_member3.5034.29
Settings /wp-admin/edit.php?post_type=mtphr_member&page=mtphr_members_settings_menu3.5137.31
Members /wp-admin/edit.php?post_type=mtphr_member3.5533.09
Add New /wp-admin/post-new.php?post_type=mtphr_member3.6651.33

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 36 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
mtphr_members_settings
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Metaphor Members
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,939 ▲17813.48 ▼1.2510.03 ▲8.4851.40 ▲7.47
Dashboard /wp-admin2,237 ▲605.62 ▲0.0291.09 ▲6.3639.92 ▲4.49
Posts /wp-admin/edit.php2,139 ▲362.05 ▲0.0333.52 ▼10.2533.83 ▼5.13
Add New Post /wp-admin/post-new.php1,568 ▲3723.06 ▲0.38674.57 ▲88.8960.64 ▲11.87
Media Library /wp-admin/upload.php1,439 ▲394.21 ▲0.06101.72 ▼1.5643.86 ▼5.40
Categories /wp-admin/edit-tags.php?taxonomy=mtphr_member_category&post_type=mtphr_member1,3102.1627.4429.11
Settings /wp-admin/edit.php?post_type=mtphr_member&page=mtphr_members_settings_menu1,1173.2738.1253.34
Members /wp-admin/edit.php?post_type=mtphr_member1,1111.9230.7628.18
Add New /wp-admin/post-new.php?post_type=mtphr_member2,4827.97165.5571.61

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • mtphr_members_settings
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 13× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mtphr-members/includes/admin/meta-boxes.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mtphr-members/includes/shortcode-gen.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mtphr-members/includes/admin/shortcode-gen.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mtphr-members/includes/admin/generators/archive.php:142
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/mtphr-members/includes/filters.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mtphr-members/includes/scripts.php:44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mtphr-members/includes/admin/generators/title.php:58
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mtphr-members/includes/admin/settings.php:83
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/mtphr-members/mtphr-members.php:43
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/mtphr-members/includes/shortcodes.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
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
Please fix the following attributes:
  • Screenshots: Screenshot #1 (Coming soon.) image required
Please take inspiration from this readme.txt

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

"Metaphor Members" version 1.1.9's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
115 characters long description:
Adds a custom post type to easily create a collection of members. Add a member archive to any page with shortcodes.

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
Success! There were no dangerous files found in this plugin3,059 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP185733521,824
PO File2227523565
CSS22858411
JavaScript39954251
XML1208

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions80
▷ Named functions80100.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
7 PNG files occupy 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon-32.png2.82KB1.64KB▼ 41.96%
assets/images/icon-16.png2.24KB1.41KB▼ 37.03%
assets/images/icons-social.png34.54KB17.20KB▼ 50.20%
assets/images/layout-icons/sidebar-left.png1.04KB0.12KB▼ 88.91%
assets/images/layout-icons/full-width.png1.03KB0.10KB▼ 90.03%