84% steel-hardness-calculator

Code Review | Steel Hardness Calculator

WordPress plugin Steel Hardness Calculator scored84%from 54 tests.

About plugin

  • Plugin page: steel-hardness-ca...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Oct 12, 2016
  • Latest release: Nov 18, 2016
  • Number of updates: 2
  • Update frequency: every 14.5 days
  • Top authors: Jmorley88 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /578 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼8.38ms] Passed 4 tests

This is a short check of server-side resources used by Steel Hardness Calculator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.33 ▼0.11
Dashboard /wp-admin3.31 ▼0.0344.03 ▼17.42
Posts /wp-admin/edit.php3.37 ▲0.0141.11 ▼5.17
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.03 ▼9.27
Media Library /wp-admin/upload.php3.24 ▲0.0132.54 ▼1.65

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Steel Hardness Calculator
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,640 ▼12114.17 ▼0.211.71 ▲0.0438.50 ▼1.64
Dashboard /wp-admin2,043 ▼1375.47 ▼0.1779.09 ▼6.8338.15 ▼2.87
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0435.00 ▼3.6429.95 ▼5.26
Add New Post /wp-admin/post-new.php1,526 ▼1123.00 ▲4.81664.22 ▲65.6263.33 ▼2.62
Media Library /wp-admin/upload.php1,400 ▼04.20 ▼0.0093.87 ▼4.8145.36 ▲1.21

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/steel-hardness-calculator/steel-calc.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: steel, steel hardness calculator, industry

steel-hardness-calculator/steel-calc.php 92% from 13 tests

This is the main PHP file of "Steel Hardness Calculator" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("steel-hardness-calculator.php" instead of "steel-calc.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected84 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP141284

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin