62% rj-quickcharts

Code Review | RJ Quickcharts

WordPress plugin RJ Quickcharts scored62%from 54 tests.

About plugin

  • Plugin page: rj-quickcharts
  • Plugin version: 0.6.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.5
  • WordPress version: 6.3.1
  • First release: Jun 17, 2013
  • Latest release: Jul 5, 2016
  • Number of updates: 45
  • Update frequency: every 24.9 days
  • Top authors: randyjensen (100%)

Code review

54 tests

User reviews

22 reviews

Install metrics

300+ active /14,511 total downloads

Benchmarks

Plugin footprint 65% 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.03MB] [CPU: ▼1.12ms] Passed 4 tests

Analyzing server-side resources used by RJ Quickcharts
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.61 ▼4.92
Dashboard /wp-admin3.33 ▲0.0346.42 ▼2.48
Posts /wp-admin/edit.php3.44 ▲0.0948.15 ▼0.33
Add New Post /wp-admin/post-new.php5.93 ▲0.0495.08 ▲7.05
Media Library /wp-admin/upload.php3.25 ▲0.0235.88 ▲3.26
My Charts /wp-admin/admin.php?page=rj-quickcharts/admin/rjqc-admin.php3.2631.65
New Chart /wp-admin/admin.php?page=rj-quickcharts/admin/rjqc-admin-new.php3.3127.02

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 31 new files
Database: 1 new table, 7 new options
New tables
wp_rj_quickcharts
New WordPress options
theysaidso_admin_options
widget_recent-comments
rjqc_db_version
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for RJ Quickcharts
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,914 ▲17913.88 ▼0.516.54 ▲4.3343.89 ▲1.00
Dashboard /wp-admin2,236 ▲485.08 ▲0.21109.25 ▼1.0843.18 ▲1.29
Posts /wp-admin/edit.php2,120 ▲282.03 ▼0.0243.22 ▲4.0934.01 ▼1.83
Add New Post /wp-admin/post-new.php1,546 ▲1323.77 ▲0.60597.15 ▼58.5355.88 ▼6.13
Media Library /wp-admin/upload.php1,419 ▲314.11 ▼0.07101.04 ▲1.3841.39 ▼4.21
My Charts /wp-admin/admin.php?page=rj-quickcharts/admin/rjqc-admin.php8721.8030.4932.42
New Chart /wp-admin/admin.php?page=rj-quickcharts/admin/rjqc-admin-new.php3,0105.16241.49108.20

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_rj_quickcharts
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/rj-quickcharts/admin/rjqc-admin-new.php
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/rj-quickcharts/rj_charts.php on line 18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/rj-quickcharts/admin/rjqc-admin-new.php:138
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/rj-quickcharts/rj_charts.php:124
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/rj-quickcharts/settings.php on line 125
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/rj-quickcharts/admin/rjqc-admin.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=rj-quickcharts/admin/rjqc-admin.php
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/rj-quickcharts/ajax/ajax.js?v=530013923&ver=6.3.1:139:27)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rj-quickcharts/admin/rjqc-admin-new.php
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function
    • > GET request to /wp-admin/admin.php?page=rj-quickcharts/admin/rjqc-admin-new.php
    • > Javascript (severe) in unknown
    /wp-content/plugins/rj-quickcharts/js/main.js 8:39 Uncaught TypeError: $(...).live is not a function
    • > GET request to /wp-admin/admin.php?page=rj-quickcharts/admin/rjqc-admin-new.php
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/rj-quickcharts/ajax/ajax.js?v=1648268011&ver=6.3.1:139:27)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/admin.php?page=rj-quickcharts/admin/rjqc-admin-new.php
    • > Rendering (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1 The specified value "!" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: Too many tags (14 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

rj-quickcharts/rj_charts.php 92% from 13 tests

The main PHP file in "RJ Quickcharts" ver. 0.6.1 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("rj-quickcharts.php" instead of "rj_charts.php")

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
Everything looks great! No dangerous files found in this plugin29,291 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript114,0955,71026,587
CSS62231471,396
PHP91821011,288
Markdown17020

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity5.86
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity2.10
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods32
▷ Static methods26.25%
▷ Public methods32100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/nav-chart.png1.85KB1.30KB▼ 29.46%