83% chart-expert

Code Review | Chart Expert

WordPress plugin Chart Expert scored83%from 54 tests.

About plugin

  • Plugin page: chart-expert
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.1.2
  • WordPress version: 6.3.1
  • First release: Dec 29, 2014
  • Latest release: Apr 22, 2015
  • Number of updates: 14
  • Update frequency: every 8.2 days
  • Top authors: sagor.touch (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /3,309 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.38ms] Passed 4 tests

Analyzing server-side resources used by Chart Expert
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.52 ▲0.37
Dashboard /wp-admin3.33 ▼0.0147.77 ▼16.81
Posts /wp-admin/edit.php3.38 ▲0.0345.80 ▼3.31
Add New Post /wp-admin/post-new.php5.91 ▲0.0383.32 ▼0.73
Media Library /wp-admin/upload.php3.25 ▲0.0334.67 ▼0.67

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Chart Expert
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,920 ▲17414.42 ▲0.046.76 ▲4.8841.36 ▼2.05
Dashboard /wp-admin2,221 ▲365.39 ▼0.42112.84 ▼2.5344.17 ▲2.11
Posts /wp-admin/edit.php2,109 ▲202.70 ▲0.7037.76 ▼0.8936.08 ▼0.14
Add New Post /wp-admin/post-new.php1,528 ▲923.69 ▲0.29595.00 ▼81.9135.58 ▼26.43
Media Library /wp-admin/upload.php1,406 ▲184.70 ▲0.58100.62 ▼13.2244.43 ▼3.55

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/chart-expert/chartLoadFunction.php:18
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/chart-expert/chartLoadFunction.php on line 18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/chart-expert/inc/shortcode-button.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/chart-expert/inc/shortcode.php:95
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/chart-expert/inc/pmzez-chart-expert-admin-css.php:7

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% 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:
  • Screenshots: These screenshots need descriptions #1, #2, #3, #4, #5 in chart-expert/assets to your readme.txt
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

chart-expert/chartLoadFunction.php 85% from 13 tests

The primary PHP file in "Chart Expert" version 1.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 292 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("chart-expert.php" instead of "chartLoadFunction.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected10,865 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript45882010,496
CSS44814239
PHP42918130

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
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
inc/css/chart-expert.png1.56KB0.93KB▼ 40.09%