84% measuresquare-calculator-widget-for-floors

Code Review | MeasureSquare Flooring Calculator

WordPress plugin MeasureSquare Flooring Calculator scored84%from 54 tests.

About plugin

  • Plugin page: measuresquare-cal...
  • Plugin version: 1.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5
  • WordPress version: 6.3.1
  • First release: Oct 6, 2020
  • Latest release: Feb 23, 2021
  • Number of updates: 18
  • Update frequency: every 7.8 days
  • Top authors: allenmeasuresquarecom (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /840 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
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.06ms] Passed 4 tests

A check of server-side resources used by MeasureSquare Flooring Calculator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0234.57 ▼2.66
Dashboard /wp-admin3.33 ▼0.0244.93 ▼14.21
Posts /wp-admin/edit.php3.38 ▲0.0249.20 ▲3.19
Add New Post /wp-admin/post-new.php5.91 ▲0.0287.74 ▼4.32
Media Library /wp-admin/upload.php3.25 ▲0.0232.84 ▲0.97

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_m2_floor_calc_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for MeasureSquare Flooring Calculator
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,911 ▲16513.97 ▲0.718.90 ▲4.2837.16 ▼2.59
Dashboard /wp-admin2,209 ▲215.88 ▲0.9795.29 ▼12.0941.22 ▼1.90
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0344.75 ▲9.1736.00 ▲1.32
Add New Post /wp-admin/post-new.php1,534 ▲1523.13 ▼0.01711.61 ▲68.6357.80 ▲1.18
Media Library /wp-admin/upload.php1,391 ▼04.22 ▼0.0295.30 ▼7.1244.47 ▲1.72

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_m2_floor_calc_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means 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
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/measuresquare-calculator-widget-for-floors/m2-floorcalc-widget-plugin.php:13

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 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Donate link: Invalid URI found ("")
Please take inspiration from this readme.txt

measuresquare-calculator-widget-for-floors/m2-floorcalc-widget-plugin.php 92% from 13 tests

The primary PHP file in "MeasureSquare Flooring Calculator" version 1.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("measuresquare-calculator-widget-for-floors.php" instead of "m2-floorcalc-widget-plugin.php")

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
Success! There were no dangerous files found in this plugin76 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1202576

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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 were not PNG files found in your plugin