73% wage-conversion-calculator

Code Review | Wage Conversion Calculator

WordPress plugin Wage Conversion Calculator scored73%from 54 tests.

About plugin

  • Plugin page: wage-conversion-c...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-5.3.2
  • WordPress version: 6.3.1
  • First release: Jan 28, 2020
  • Latest release: Jan 28, 2020
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: andrewstacy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /519 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.70MB] [CPU: ▼45.70ms] Passed 4 tests

Analyzing server-side resources used by Wage Conversion Calculator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.29 ▼1.178.74 ▼31.93
Dashboard /wp-admin2.31 ▼1.0011.30 ▼37.92
Posts /wp-admin/edit.php2.31 ▼1.0511.49 ▼34.90
Add New Post /wp-admin/post-new.php2.31 ▼3.5811.64 ▼78.03
Media Library /wp-admin/upload.php2.31 ▼0.9210.80 ▼27.23

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Wage Conversion Calculator
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.35 ▼0.951.77 ▼0.1544.18 ▼0.68
Dashboard /wp-admin2,206 ▲215.86 ▲0.04102.99 ▲0.3439.01 ▼4.93
Posts /wp-admin/edit.php2,089 ▼02.03 ▼0.0238.64 ▼3.4331.98 ▼5.57
Add New Post /wp-admin/post-new.php1,533 ▼1423.09 ▲4.64687.97 ▲81.3953.96 ▼1.44
Media Library /wp-admin/upload.php1,391 ▲34.24 ▼0.00109.15 ▲10.0247.55 ▲6.97

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method goodcalculators_wage_calculator::calc_init() should not be called statically
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors 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/wage-conversion-calculator/goodcalculators_wage_calculator.php:298

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (This screen shot description corresponds to wage_calculator.gif.) image missing
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
The official readme.txt is a good inspiration

wage-conversion-calculator/goodcalculators_wage_calculator.php 85% from 13 tests

"Wage Conversion Calculator" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wage-conversion-calculator.php" instead of "goodcalculators_wage_calculator.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 503 characters long)

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 detected233 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14819233

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin