64% redbrick

Code Review | RedBrick

WordPress plugin RedBrick scored 64% from 53 tests.

About plugin

  • Plugin page: redbrick
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.8
  • WordPress version: 5.8.1
  • First release: Jul 19, 2021
  • Latest release: Aug 9, 2021
  • Number of updates: 6
  • Update frequency: every 4.3 days
  • Top authors: _luigi (100%)

Code review

53 tests

User reviews

1 review

Install metrics

10+ active / 129 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.15MB] [CPU: ▼277.99ms] Passed 4 tests

An overview of server-side resources used by RedBrick
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.96 ▲0.2434.75 ▲13.68
Dashboard /wp-admin3.25 ▲0.1949.19 ▲6.60
Posts /wp-admin/edit.php3.29 ▲0.1943.44 ▲4.25
Add New Post /wp-admin/post-new.php5.54 ▲0.1195.85 ▼1,116.42
Media Library /wp-admin/upload.php3.12 ▲0.1229.59 ▼6.40

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 1 new option
New WordPress options
redbrick

Browser metrics Passed 4 tests

A check of browser resources used by RedBrick
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,697 ▲11515.94 ▲0.297.33 ▼0.1148.42 ▲0.37
Dashboard /wp-admin2,997 ▲1445.97 ▲0.10136.08 ▼7.11105.93 ▼1.87
Posts /wp-admin/edit.php2,706 ▼02.69 ▲0.0062.59 ▼4.5494.94 ▲3.34
Add New Post /wp-admin/post-new.php1,857 ▲37619.17 ▲0.66370.05 ▲5.17113.56 ▼1.53
Media Library /wp-admin/upload.php1,775 ▲35.00 ▲0.01157.27 ▲5.66109.09 ▼8.22

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Compile error in wp-content/plugins/redbrick/library/base-plugin.class.php+11
    Cannot declare class RedBrick\BasePlugin, because the name is already in use
  • Incomplete uninstall procedure, leaving 11 files (0.08MB) in the plugin directory
    • (new file) library/index.php
    • (new file) readme.txt
    • (new file) includes/index.php
    • (new file) index.php
    • (new file) library/db.class.php
    • (new file) license.txt
    • (new file) redbrick.php
    • (new file) library/base-plugin.class.php
    • (new file) includes/comment-validator.class.php
    • (new file) includes/core.class.php
    • ...
  • This plugin does not fully uninstall, leaving 2 options in the database
    • recovery_mode_email_last_sent
    • redbrick

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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
The following issues need your attention
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'RedBrick\\BasePlugin' not found in wp-content/plugins/redbrick/includes/core.class.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function RedBrick\\is_admin() in wp-content/plugins/redbrick/library/base-plugin.class.php:110

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 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
3 plugin tags: spam, anti-spam, comments

redbrick/redbrick.php Passed 13 tests

"RedBrick" version 1.0.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
44 characters long description:
Simple anti-spam plugin for WordPress blogs.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin932 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP6327648932

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity41.00
▷ Minimum class complexity21.00
▷ Maximum class complexity63.00
Average method complexity2.87
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes125.00%
▷ Concrete classes375.00%
▷ Final classes133.33%
Methods83
▷ Static methods22.41%
▷ Public methods6173.49%
▷ Protected methods67.23%
▷ Private methods1619.28%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 1 test

Image compression Passed 1 test

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin