68% responsive-investment-calculator

Code Review | Responsive Investment Calculator

WordPress plugin Responsive Investment Calculator scored 68% from 54 tests.

About plugin

  • Plugin page: responsive-invest...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.3.1
  • WordPress version: 5.8.1
  • First release: Nov 23, 2015
  • Latest release: Dec 17, 2016
  • Number of updates: 8
  • Update frequency: every 48.8 days
  • Top authors: liddweaver (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 2,529 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▼1.63MB] [CPU: ▼181.98ms] Passed 4 tests

This is a short check of server-side resources used by Responsive Investment Calculator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /1.99 ▼0.8410.52 ▼22.10
Dashboard /wp-admin2.01 ▼1.0411.12 ▼35.43
Posts /wp-admin/edit.php2.02 ▼1.0910.24 ▼34.96
Add New Post /wp-admin/post-new.php2.01 ▼3.429.63 ▼633.70
Media Library /wp-admin/upload.php2.02 ▼0.9910.10 ▼23.83
Resp Investment Calculator /wp-admin/options-general.php?page=ric_options2.0210.42

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 26 new files
Database: no new tables, 2 new options
New WordPress options
widget_ric_widget
ric_options

Browser metrics Passed 4 tests

A check of browser resources used by Responsive Investment Calculator
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲11215.83 ▲0.168.65 ▼3.5450.25 ▼0.96
Dashboard /wp-admin2,978 ▲475.94 ▼0.11128.25 ▼23.25116.76 ▲1.21
Posts /wp-admin/edit.php2,744 ▲52.73 ▲0.0263.47 ▼2.7093.41 ▲0.10
Add New Post /wp-admin/post-new.php1,594 ▲9418.93 ▲0.10383.97 ▲5.62113.43 ▲2.61
Media Library /wp-admin/upload.php1,815 ▲85.01 ▼0.02151.40 ▲11.74115.06 ▼4.31
Resp Investment Calculator /wp-admin/options-general.php?page=ric_options1,7042.0958.5696.00

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5304
    The called constructor method for WP_Widget in RICWidget is deprecated since version 4.3.0! Use __construct() instead.
  • The uninstall procedure has failed, leaving 1 option in the database
    • widget_ric_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=ric_options
    • > User deprecated in wp-includes/functions.php+5304
    The called constructor method for WP_Widget in RICWidget is deprecated since version 4.3.0! Use __construct() instead.

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 take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'RIC' not found in wp-content/plugins/responsive-investment-calculator/adm/partial-settings-page.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/responsive-investment-calculator/inc/array-default-options.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === responsive-investment-calculator === )
The official readme.txt might help

responsive-investment-calculator/responsive-investment-calculator.php 92% from 13 tests

The main PHP file in "Responsive Investment Calculator" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 150 characters long)

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
Good job! No executable or dangerous file extensions detected1,648 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP152571651,303
JavaScript15815195
CSS1250150

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity10.25
▷ Minimum class complexity1.00
▷ Maximum class complexity31.00
Average method complexity1.88
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods84
▷ Static methods1821.43%
▷ Public methods3845.24%
▷ Protected methods33.57%
▷ Private methods4351.19%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
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/icon_inspector.png0.49KB0.38KB▼ 22.31%