84% fc-wp

Code Review | Plugin Name: FusionCharts for Wordpress

WordPress plugin Plugin Name: FusionCharts for Wordpress scored 84% from 54 tests.

About plugin

  • Plugin page: fc-wp
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.3-4.6.1
  • WordPress version: 6.3.1
  • First release: Sep 9, 2015
  • Latest release: Sep 26, 2016
  • Number of updates: 40
  • Update frequency: every 9.6 days
  • Top authors: sguha1988.life (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 2,083 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: ▼1.77ms] Passed 4 tests

This is a short check of server-side resources used by Plugin Name: FusionCharts for Wordpress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0246.71 ▲8.70
Dashboard /wp-admin3.33 ▲0.0245.39 ▼5.14
Posts /wp-admin/edit.php3.38 ▲0.0261.31 ▲14.25
Add New Post /wp-admin/post-new.php5.92 ▲0.0387.46 ▼11.49
Media Library /wp-admin/upload.php3.25 ▲0.0237.44 ▲0.86

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Plugin Name: FusionCharts for Wordpress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.57 ▲0.191.62 ▼0.0440.36 ▼10.83
Dashboard /wp-admin2,206 ▲215.86 ▼0.05110.29 ▲5.0538.04 ▼2.61
Posts /wp-admin/edit.php2,092 ▲32.00 ▼0.0236.34 ▼2.8129.72 ▼1.68
Add New Post /wp-admin/post-new.php1,529 ▲1022.84 ▼0.19599.34 ▼9.7832.46 ▼25.21
Media Library /wp-admin/upload.php1,385 ▼04.24 ▼0.01101.87 ▼1.0042.43 ▼0.95

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • 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 shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fc-wp/fc-wp.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 97% 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
Please fix the following attributes:
  • Plugin Name: Please specify the plugin name on the first line ( === Plugin Name: FusionCharts for Wordpress === )
The official readme.txt is a good inspiration

fc-wp/fc-wp.php Passed 13 tests

The main PHP file in "Plugin Name: FusionCharts for Wordpress" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
104 characters long description:
FusionCharts for Wordpress enables addition of interactive JavaScript charts in Wordpress posts or pages

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected5,223 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript18672454,756
CSS25014223
PHP31516143
HTML1218101

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity3.00
▷ Minimum method complexity3.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/fc.png7.03KB2.91KB▼ 58.58%