78% webera-redcase

Code Review | RedCase

WordPress plugin RedCase scored78%from 54 tests.

About plugin

  • Plugin page: webera-redcase
  • Plugin version: 4.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.1
  • WordPress version: 6.3.1
  • First release: Jan 28, 2019
  • Latest release: Jul 25, 2019
  • Number of updates: 51
  • Update frequency: every 3.6 days
  • Top authors: felipemarques10 (96.08%)joelzamboni (5.88%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,116 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.07MB] [CPU: ▲0.44ms] Passed 4 tests

An overview of server-side resources used by RedCase
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0740.03 ▼4.99
Dashboard /wp-admin3.37 ▲0.0665.75 ▲11.71
Posts /wp-admin/edit.php3.42 ▲0.0651.37 ▲1.74
Add New Post /wp-admin/post-new.php5.97 ▲0.0896.29 ▲5.67
Media Library /wp-admin/upload.php3.29 ▲0.0637.96 ▼0.66

Server storage [IO: ▲0.50MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
Just a few items left to fix
  • The plugin illegally modified 1 file (4.00KB) outside of "wp-content/plugins/webera-redcase/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 32 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
redcase_key
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for RedCase
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,068 ▲30714.25 ▼0.106.13 ▲4.0144.50 ▲0.66
Dashboard /wp-admin2,241 ▲385.81 ▲0.9498.51 ▼23.3138.94 ▼6.24
Posts /wp-admin/edit.php2,126 ▲262.02 ▲0.0338.07 ▲1.1536.93 ▲1.70
Add New Post /wp-admin/post-new.php1,546 ▲1517.72 ▼5.73653.00 ▼30.9766.34 ▲11.48
Media Library /wp-admin/upload.php1,417 ▲204.25 ▲0.07100.03 ▼2.9648.51 ▼1.39

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • redcase_key
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

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 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
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/webera-redcase/process/deals-template.php
    • > /wp-content/plugins/webera-redcase/index.php
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/webera-redcase/process/deals-template.php on line 3
    • > PHP Warning
      Use of undefined constant DATA_PH - assumed 'DATA_PH' (this will throw an Error in a future version of PHP) in wp-content/plugins/webera-redcase/process/deals-template.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/webera-redcase/includes/admin/config.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
2 plugin tags: offers, deals

webera-redcase/index.php 92% from 13 tests

The main PHP script in "RedCase" version 4.2 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("webera-redcase.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin1,233 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP1918492680
CSS35914488
JavaScript6142663
Markdown1002

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin