48% partners

Code Review | Partners

WordPress plugin Partners scored48%from 54 tests.

About plugin

  • Plugin page: partners
  • Plugin version: 0.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.1.1
  • WordPress version: 6.3.1
  • First release: Feb 16, 2015
  • Latest release: Mar 12, 2015
  • Number of updates: 8
  • Update frequency: every 4.4 days
  • Top authors: mightydigital (87.5%)farinspace (25%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,746 total downloads

Benchmarks

Plugin footprint 30% 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.08MB] [CPU: ▼9.01ms] Passed 4 tests

Analyzing server-side resources used by Partners
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0736.94 ▼6.31
Dashboard /wp-admin3.41 ▲0.0648.24 ▼17.30
Posts /wp-admin/edit.php3.52 ▲0.1648.63 ▲2.23
Add New Post /wp-admin/post-new.php5.99 ▲0.1087.13 ▼5.69
Media Library /wp-admin/upload.php3.33 ▲0.1035.53 ▼6.75
All Members /wp-admin/admin.php?page=mdpartners3.3033.60
Settings /wp-admin/admin.php?page=mdpartners_settings3.3033.47
Denied Email /wp-admin/admin.php?page=mdpartners_denied_email3.3330.92
Approved Email /wp-admin/admin.php?page=mdpartners_approved_email3.3330.12

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 22 new files
Database: 1 new table, 7 new options
New tables
wp_mdpartners
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
mdpartners_db_version

Browser metrics Passed 4 tests

An overview of browser requirements for Partners
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲7414.35 ▲0.001.64 ▼0.2537.59 ▼5.90
Dashboard /wp-admin2,241 ▲645.62 ▲0.0193.92 ▼9.2838.85 ▼3.77
Posts /wp-admin/edit.php2,154 ▲542.05 ▲0.0838.19 ▼0.5242.27 ▲2.35
Add New Post /wp-admin/post-new.php1,567 ▲4123.04 ▼0.53682.89 ▼5.7660.14 ▲0.34
Media Library /wp-admin/upload.php1,448 ▲454.23 ▲0.07104.94 ▲7.1145.32 ▼1.22
All Members /wp-admin/admin.php?page=mdpartners1,0142.0525.5227.76
Settings /wp-admin/admin.php?page=mdpartners_settings1,0532.1723.4231.82
Denied Email /wp-admin/admin.php?page=mdpartners_denied_email9102.0423.9030.51
Approved Email /wp-admin/admin.php?page=mdpartners_approved_email9102.0424.0133.21

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Error in wp-content/plugins/partners/inc/MightyDev/Partners.php+19
    Uncaught ArgumentCountError: Too few arguments to function MightyDev\WordPress\Partners::__construct(), 0 passed in wp-content/plugins/partners/uninstall.php on line 9 and exactly 1 expected in wp-content/plugins/partners/inc/MightyDev/Partners.php:19
    Stack trace:
    #0 wp-content/plugins/partners/uninstall.php(9): MightyDev\WordPress\Partners->__construct()
    #1 wp-admin/includes/plugin.php(1245): include_once('/var/www/wordpr...')
    #2 wp-admin/includes/plugin.php(960): uninstall_plugin()
  • The plugin did not uninstall successfully, leaving 22 files (0.13MB) in the plugin directory
    • (new file) inc/MightyDev/Partners.php
    • (new file) inc/WPAlchemy/Factory.php
    • (new file) inc/WPAlchemy/Page.php
    • (new file) inc/Symfony/Component/ClassLoader/Psr4ClassLoader.php
    • (new file) inc/WPAlchemy/Notice.php
    • (new file) inc/approved-email.php
    • (new file) inc/autoload.php
    • (new file) inc/MightyDev/Nooz.php
    • (new file) inc/MightyDev/FormField.php
    • (new file) inc/WPAlchemy/MetaBox.php
    • ...
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_mdpartners
  • This plugin does not fully uninstall, leaving 8 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • mdpartners_db_version
    • recovery_mode_email_last_sent
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
The following issues need your attention
  • 7× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/partners/inc/approved-email.php
    • > /wp-content/plugins/partners/inc/login-form.php
    • > /wp-content/plugins/partners/inc/forgot-password-form.php
    • > /wp-content/plugins/partners/inc/registration-form.php
    • > /wp-content/plugins/partners/inc/denied-email.php
    • > /wp-content/plugins/partners/inc/default-pages.php
    • > /wp-content/plugins/partners/inc/reset-password-form.php
  • 50× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: nonce in wp-content/plugins/partners/inc/approved-email.php on line 14
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/partners/inc/registration-form.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function MightyDev\\WordPress\\get_bloginfo() in wp-content/plugins/partners/inc/MightyDev/Partners.php:44
    • > PHP Notice
      Undefined variable: option_name in wp-content/plugins/partners/inc/denied-email.php on line 25
    • > PHP Notice
      Undefined variable: form in wp-content/plugins/partners/inc/forgot-password-form.php on line 1
    • > PHP Notice
      Undefined variable: option_name in wp-content/plugins/partners/inc/approved-email.php on line 20
    • > PHP Notice
      Undefined variable: option_name in wp-content/plugins/partners/inc/approved-email.php on line 28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/partners/inc/WPAlchemy/MetaBox.php:16
    • > PHP Notice
      Undefined variable: mb in wp-content/plugins/partners/inc/coverage-meta.php on line 21
    • > PHP Notice
      Undefined variable: option_name in wp-content/plugins/partners/inc/denied-email.php on line 21

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)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Manage registered members), #2 (Robust settings), #3 (Assisted default page creation)
  • Plugin Name: You should set the name of your plugin on the first line ( === partners === )
You can take inspiration from this readme.txt

partners/partners.php Passed 13 tests

The main PHP script in "Partners" version 0.2.0 is automatically included on every request by WordPress
54 characters long description:
Creates a fenced membership area with private content.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected3,164 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP208099103,164

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity30.62
▷ Minimum class complexity1.00
▷ Maximum class complexity239.00
Average method complexity3.47
▷ Minimum method complexity1.00
▷ Maximum method complexity68.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes13
▷ Abstract classes17.69%
▷ Concrete classes1292.31%
▷ Final classes00.00%
Methods151
▷ Static methods85.30%
▷ Public methods13891.39%
▷ Protected methods117.28%
▷ Private methods21.32%
Functions17
▷ Named functions952.94%
▷ Anonymous functions847.06%
Constants17
▷ Global constants17100.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
There are no PNG files in this plugin