77% cidram

Code Review | CIDRAM

WordPress plugin CIDRAM scored77%from 54 tests.

About plugin

  • Plugin page: cidram
  • Plugin version: 3.4.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Aug 4, 2016
  • Latest release: Dec 1, 2023
  • Number of updates: 144
  • Update frequency: every 18.6 days
  • Top authors: Maikuolan (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

10+ active /5,148 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲7.23MB] [CPU: ▲56.06ms] 75% from 4 tests

An overview of server-side resources used by CIDRAM
The following require your attention
  • Extra RAM: Try to keep extra memory usage under 5MB (currently 7.23MB on /wp-admin/upload.php)
PageMemory (MB)CPU Time (ms)
Home /10.71 ▲7.24108.40 ▲66.85
Dashboard /wp-admin10.73 ▲7.38108.10 ▲48.77
Posts /wp-admin/edit.php10.73 ▲7.37119.35 ▲72.63
Add New Post /wp-admin/post-new.php12.79 ▲6.90147.13 ▲44.10
Media Library /wp-admin/upload.php10.73 ▲7.5098.32 ▲64.52

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

Analyzing filesystem and database footprints of this plugin
Just a few items left to fix
  • You have illegally modified 2 files (7.77KB) outside of "wp-content/plugins/cidram/" and "wp-content/uploads/"
    • (new file) wp-content/plugins/.htaccess
    • (new file) wp-content/plugins/cidram-configuration.yml
Filesystem: 377 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for CIDRAM
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲5914.31 ▼0.081.60 ▼0.2437.15 ▼9.22
Dashboard /wp-admin2,214 ▲365.62 ▲0.0493.74 ▼13.6844.77 ▲1.67
Posts /wp-admin/edit.php2,116 ▲161.94 ▼0.0839.40 ▼2.6436.65 ▼2.11
Add New Post /wp-admin/post-new.php1,539 ▼121.00 ▼1.91632.18 ▼41.0760.06 ▲1.30
Media Library /wp-admin/upload.php1,416 ▲134.27 ▲0.1097.41 ▲2.5341.98 ▲0.55

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/cidram/vault/bypasses.php
  • 34× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/cidram/vault/modules/bgpview.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Maikuolan\\Common\\CommonAbstract' not found in wp-content/plugins/cidram/vault/Maikuolan/Common/Operation.php:18
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/cidram/vault/modules/ipapi.php:17
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/cidram/vault/events/default.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Maikuolan\\Common\\CommonAbstract' not found in wp-content/plugins/cidram/vault/Maikuolan/Common/YAML.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Maikuolan\\Common\\CommonAbstract' not found in wp-content/plugins/cidram/vault/Maikuolan/Common/Matrix.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Maikuolan\\Common\\CommonAbstract' not found in wp-content/plugins/cidram/vault/Maikuolan/Common/L10N.php:18
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/cidram/vault/modules/badhosts.php:17
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/cidram/vault/modules/bobuam.php:31
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/cidram/vault/modules/tor.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Tags: Too many tags (16 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

cidram/cidram.php 92% from 13 tests

The main file in "CIDRAM" v. 3.4.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 650 characters long)

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected66,398 lines of code in 290 files:
LanguageFilesBlank linesComment linesLines of code
YAML851391,88738,720
PHP502,1295,47721,281
HTML844202,827
CSS93112,024
PO File251502501,103
Markdown11300224
JavaScript2120185
SVG340034

PHP code 0% from 2 tests

An overview of cyclomatic complexity and code structure
Please fix the following
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 1,166)
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 120)
Cyclomatic complexity
Average complexity per logical line of code0.75
Average class complexity164.26
▷ Minimum class complexity5.00
▷ Maximum class complexity1,166.00
Average method complexity11.06
▷ Minimum method complexity1.00
▷ Maximum method complexity120.00
Code structure
Namespaces2
Interfaces0
Traits10
Classes21
▷ Abstract classes29.52%
▷ Concrete classes1990.48%
▷ Final classes00.00%
Methods329
▷ Static methods00.00%
▷ Public methods16449.85%
▷ Protected methods00.00%
▷ Private methods16550.15%
Functions80
▷ Named functions00.00%
▷ Anonymous functions80100.00%
Constants22
▷ Global constants00.00%
▷ Class constants22100.00%
▷ Public constants1777.27%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vault/assets/frontend/default/lock_wt_c.png0.66KB0.17KB▼ 74.07%
vault/assets/frontend/default/lock_rd_o.png0.72KB0.27KB▼ 62.89%
vault/assets/frontend/default/lock_wt_o.png0.71KB0.26KB▼ 62.60%
vault/assets/frontend/default/lock_rd_c.png0.70KB0.17KB▼ 75.17%
vault/assets/frontend/default/lock_bl_c.png0.69KB0.17KB▼ 75.18%