77% badgeos-restrict-content-pro-integration

Code Review | BadgeOS Restrict Content Pro

WordPress plugin BadgeOS Restrict Content Pro scored77%from 54 tests.

About plugin

  • Plugin page: badgeos-restrict-...
  • 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 7, 2020
  • Latest release: Aug 8, 2020
  • Number of updates: 6
  • Update frequency: every 2.2 days
  • Top authors: learningtimes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /472 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.05ms] Passed 4 tests

This is a short check of server-side resources used by BadgeOS Restrict Content Pro
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.65 ▼5.42
Dashboard /wp-admin3.31 ▲0.0049.48 ▼1.53
Posts /wp-admin/edit.php3.36 ▲0.0047.50 ▼3.32
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.60 ▼5.45
Media Library /wp-admin/upload.php3.23 ▲0.0037.43 ▼2.01
BadgeOS RCP Integration /wp-admin/admin.php?page=badgeos_rcp_settings3.0022.76

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

BadgeOS Restrict Content Pro: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.29 ▼0.061.96 ▲0.2839.14 ▼3.25
Dashboard /wp-admin2,198 ▲215.64 ▼0.0285.64 ▼9.7943.40 ▲5.02
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0135.71 ▲0.3641.79 ▲0.27
Add New Post /wp-admin/post-new.php1,526 ▼020.94 ▼2.68673.65 ▼36.6151.14 ▼19.84
Media Library /wp-admin/upload.php1,400 ▲34.15 ▼0.03113.49 ▲8.2947.73 ▼0.89
BadgeOS RCP Integration /wp-admin/admin.php?page=badgeos_rcp_settings280.420.133.70

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
The following issues need your attention
  • 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-restrict-content-pro-integration/includes/steps-ui.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/badgeos-restrict-content-pro-integration/includes/rules-engine.php:43

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=badgeos_rcp_settings
    • > Network (severe)
    wp-admin/admin.php?page=badgeos_rcp_settings - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
Please take inspiration from this readme.txt

badgeos-restrict-content-pro-integration/badgeos-recpro.php 69% from 13 tests

The principal PHP file in "BadgeOS Restrict Content Pro" v. 1.0.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 161 characters long)
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("domain/path")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("badgeos-restrict-content-pro-integration.php" instead of "badgeos-recpro.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin1,674 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP86238121,650
Markdown215024

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity30.00
▷ Minimum class complexity11.00
▷ Maximum class complexity73.00
Average method complexity4.22
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods45
▷ Static methods12.22%
▷ Public methods3986.67%
▷ Protected methods00.00%
▷ Private methods613.33%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants990.00%
▷ Class constants110.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected