78% zesty-custom-post-types-for-paid-memberships-pro

Code Review | Zesty Custom Post Types for Paid Memberships Pro

WordPress plugin Zesty Custom Post Types for Paid Memberships Pro scored78%from 54 tests.

About plugin

  • Plugin page: zesty-custom-post...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.0
  • WordPress version: 6.3.1
  • First release: Jun 23, 2022
  • Latest release: Jun 23, 2022
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: Bijingus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /267 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

Server-side resources used by Zesty Custom Post Types for Paid Memberships Pro
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.16 ▼4.18
Dashboard /wp-admin3.34 ▲0.0348.35 ▼0.87
Posts /wp-admin/edit.php3.39 ▲0.0350.38 ▲0.25
Add New Post /wp-admin/post-new.php5.94 ▲0.0599.13 ▼12.70
Media Library /wp-admin/upload.php3.26 ▲0.0339.97 ▲3.26
Help /wp-admin/admin.php?page=zpmpro_help3.2332.73
More Plugins /wp-admin/admin.php?page=zpmpro_plugins3.2333.59
Options /wp-admin/admin.php?page=zpmpro_options3.2333.47

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Zesty Custom Post Types for Paid Memberships Pro: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,881 ▲12413.16 ▼1.405.00 ▲2.4838.81 ▼10.55
Dashboard /wp-admin2,259 ▲715.87 ▲0.9999.97 ▼4.6939.48 ▼0.72
Posts /wp-admin/edit.php2,148 ▲592.03 ▼0.0040.33 ▼3.0737.15 ▲2.29
Add New Post /wp-admin/post-new.php1,567 ▲4823.39 ▲0.09597.07 ▼109.7450.33 ▼7.47
Media Library /wp-admin/upload.php1,447 ▲594.23 ▲0.0597.23 ▼9.9842.11 ▼3.03
Help /wp-admin/admin.php?page=zpmpro_help9282.0129.0743.74
More Plugins /wp-admin/admin.php?page=zpmpro_plugins8941.8924.9324.20
Options /wp-admin/admin.php?page=zpmpro_options8691.8826.0218.78

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

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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 take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/zesty-custom-post-types-for-paid-memberships-pro/plugin.php
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/zesty-custom-post-types-for-paid-memberships-pro/ajax/options-ajax.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/zesty-custom-post-types-for-paid-memberships-pro/init/enqueue.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/zesty-custom-post-types-for-paid-memberships-pro/admin/admin-nav-menu.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/zesty-custom-post-types-for-paid-memberships-pro/admin/admin-nav-menu.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/zesty-custom-post-types-for-paid-memberships-pro/admin/admin-nav-menu.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/zesty-custom-post-types-for-paid-memberships-pro/admin/admin-nav-menu.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/zesty-custom-post-types-for-paid-memberships-pro/admin/admin-side-menu.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: custom post types, restrict, paid memberships pro, pmpro, membership

zesty-custom-post-types-for-paid-memberships-pro/plugin.php 77% from 13 tests

The principal PHP file in "Zesty Custom Post Types for Paid Memberships Pro" v. 1.0.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("zesty-custom-post-types-for-paid-memberships-pro.php" instead of "plugin.php")
  • Domain Path: The domain path points to a folder that does not exist ("/lang")

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
Good job! No executable or dangerous file extensions detected355 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP94811225
CSS2201176
JavaScript214634
Markdown111020

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
8 PNG files occupy 0.15MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/step-2.png10.47KB2.77KB▼ 73.49%
images/logo-med.png22.29KB9.45KB▼ 57.62%
images/step-1.png34.32KB12.87KB▼ 62.50%
images/wp-courses-banner.png26.72KB10.98KB▼ 58.88%
images/zesty-emails-logo-white-sm.png1.04KB0.98KB▼ 5.28%