72% c9-variables

Code Review | C9 Variables

WordPress plugin C9 Variables scored72%from 54 tests.

About plugin

  • Plugin page: c9-variables
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9
  • WordPress version: 6.3.1
  • First release: Apr 25, 2018
  • Latest release: Apr 26, 2018
  • Number of updates: 13
  • Update frequency: every 2.3 days
  • Top authors: nitinvp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /841 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.38MB] [CPU: ▲1,325.00ms] 50% from 4 tests

A check of server-side resources used by C9 Variables
Please have a look at the following items
  • CPU: The total CPU usage must kept under 500.00ms (currently 3,234.42ms on /wp-admin/admin.php?page=c9_vars_other_plugins)
  • Extra CPU: Extra CPU usage should be kept under 200.00ms (currently 1,325.00ms on /wp-admin/admin.php?page=c9_vars_other_plugins)
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3745.11 ▲0.67
Dashboard /wp-admin3.69 ▲0.391,999.92 ▲1,944.20
Posts /wp-admin/edit.php3.73 ▲0.371,849.70 ▲1,796.31
Add New Post /wp-admin/post-new.php6.29 ▲0.411,917.36 ▲1,819.69
Media Library /wp-admin/upload.php3.61 ▲0.381,719.63 ▲1,683.33
About Variables /wp-admin/admin.php?page=c9_vars_about3.572,008.29
Settings /wp-admin/admin.php?page=c9_vars_settings3.583,181.99
Other Plugins /wp-admin/admin.php?page=c9_vars_other_plugins3.573,234.42

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 37 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for C9 Variables
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,922 ▲13613.69 ▼0.685.87 ▲3.7443.99 ▼5.99
Dashboard /wp-admin2,230 ▲565.54 ▼0.0382.57 ▼15.8175.27 ▲31.86
Posts /wp-admin/edit.php2,150 ▲502.01 ▲0.0634.57 ▼1.5336.48 ▲0.96
Add New Post /wp-admin/post-new.php1,568 ▲4223.10 ▲0.10713.77 ▲13.5663.94 ▲3.92
Media Library /wp-admin/upload.php1,450 ▲504.18 ▲0.0297.67 ▼11.4274.64 ▲27.57
About Variables /wp-admin/admin.php?page=c9_vars_about8732.0323.9837.58
Settings /wp-admin/admin.php?page=c9_vars_settings8611.8325.4730.09
Other Plugins /wp-admin/admin.php?page=c9_vars_other_plugins8872.0624.2533.68

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=c9_vars_other_plugins
    • > Warning in wp-content/plugins/c9-variables/includes/code/basic/admin/ui/class-c9-variables-admin-ui.php+89
    count(): Parameter must be an array or an object that implements Countable

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
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/c9-variables/admin/partials/c9-variables-admin-display.php
    • > /wp-content/plugins/c9-variables/includes/code/basic/admin/ui/variable-selector.php
    • > /wp-content/plugins/c9-variables/public/partials/c9-variables-public-display.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=c9_vars_other_plugins
    • > Network (severe)
    https://cloudnineapps.com/images/products/wordpress-plugins/c9-variables-pro/c9-variables-pro.png - Failed to load resource: the server responded with a status of 404 ()

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
10 plugin tags: modularize, modularization, tools, easy maintain, simplify...

c9-variables/c9-variables.php Passed 13 tests

Analyzing the main PHP file in "C9 Variables" version 1.0.0
45 characters long description:
Use variables to make smart reusable content.

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
No dangerous file extensions were detected1,369 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP222928311,176
CSS32310129
JavaScript222964

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity6.50
▷ Minimum class complexity1.00
▷ Maximum class complexity25.00
Average method complexity2.01
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods87
▷ Static methods2022.99%
▷ Public methods7383.91%
▷ Protected methods910.34%
▷ Private methods55.75%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
4 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon-bw-20x20.png0.49KB0.31KB▼ 36.83%
admin/images/icon-128x128.png6.19KB3.38KB▼ 45.42%
assets/images/icon-256x256.png13.20KB6.26KB▼ 52.56%
assets/images/icon-128x128.png6.19KB3.38KB▼ 45.42%