83% badgeos-memberpress-integration

Code Review | BadgeOS MemberPress Integration

WordPress plugin BadgeOS MemberPress Integration scored83%from 54 tests.

About plugin

  • Plugin page: badgeos-memberpre...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4.2
  • WordPress version: 6.3.1
  • First release: Aug 24, 2020
  • Latest release: Sep 7, 2020
  • Number of updates: 4
  • Update frequency: every 3.5 days
  • Top authors: learningtimes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /660 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.14MB] [CPU: ▼11.20ms] Passed 4 tests

An overview of server-side resources used by BadgeOS MemberPress Integration
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.74 ▼0.90
Dashboard /wp-admin3.23 ▼0.0837.15 ▼10.00
Posts /wp-admin/edit.php3.29 ▼0.0636.28 ▼12.74
Add New Post /wp-admin/post-new.php5.46 ▼0.4273.24 ▼17.66
Media Library /wp-admin/upload.php3.23 ▲0.0032.70 ▼4.41

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

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

Browser metrics Passed 4 tests

A check of browser resources used by BadgeOS MemberPress Integration
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.11 ▼1.201.71 ▼0.2442.69 ▼2.48
Dashboard /wp-admin2,221 ▲274.86 ▼0.95117.34 ▲12.3945.75 ▲4.93
Posts /wp-admin/edit.php2,100 ▲32.01 ▲0.0034.18 ▼6.6634.67 ▼5.67
Add New Post /wp-admin/post-new.php1,536 ▲1023.22 ▲5.50662.73 ▼18.0552.71 ▼3.23
Media Library /wp-admin/upload.php1,397 ▼64.26 ▲0.06117.42 ▼7.7148.85 ▼7.05

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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 fix the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/badgeos-memberpress-integration/includes/steps-ui.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/badgeos-memberpress-integration/includes/rules-engine.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
You can look at the official readme.txt

badgeos-memberpress-integration/badgeos-memberpress.php 77% from 13 tests

The main PHP file in "BadgeOS MemberPress Integration" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Description: Keep the plugin description shorter than 140 characters (currently 152 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("badgeos-memberpress-integration.php" instead of "badgeos-memberpress.php")

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 detected882 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP5325410860
Markdown113022

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity11.50
▷ Minimum class complexity11.00
▷ Maximum class complexity12.00
Average method complexity1.94
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods18
▷ Static methods316.67%
▷ Public methods1583.33%
▷ Protected methods00.00%
▷ Private methods316.67%
Functions22
▷ Named functions2195.45%
▷ Anonymous functions14.55%
Constants11
▷ Global constants1090.91%
▷ Class constants19.09%
▷ Public constants1100.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
PNG images were not found in this plugin