84% shape-size-calculator

Code Review | Shape Size Calculator

WordPress plugin Shape Size Calculator scored84%from 54 tests.

About plugin

  • Plugin page: shape-size-calcul...
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.6
  • WordPress version: 6.3.1
  • First release: Dec 21, 2019
  • Latest release: Feb 2, 2021
  • Number of updates: 5
  • Update frequency: every 81.8 days
  • Top authors: raviyadavg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /625 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

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

An overview of server-side resources used by Shape Size Calculator
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0250.39 ▲4.01
Dashboard /wp-admin3.32 ▲0.0249.56 ▼1.67
Posts /wp-admin/edit.php3.37 ▲0.0147.47 ▼5.63
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.96 ▼5.67
Media Library /wp-admin/upload.php3.24 ▲0.0134.91 ▼2.23

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Shape Size Calculator
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,901 ▲14013.42 ▼0.959.25 ▲7.4141.86 ▼1.66
Dashboard /wp-admin2,195 ▲185.57 ▼0.0991.89 ▼10.9942.20 ▼1.06
Posts /wp-admin/edit.php2,103 ▲32.01 ▼0.0039.92 ▲2.5341.05 ▲6.14
Add New Post /wp-admin/post-new.php1,526 ▼923.24 ▲0.25662.65 ▲24.7059.37 ▲4.96
Media Library /wp-admin/upload.php1,397 ▼04.16 ▲0.08106.00 ▼0.3043.10 ▼0.53

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

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)
Everything seems fine, however 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-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shape-size-calculator/size_calulator.php:28

User-side errors Passed 1 test

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

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
These attributes need to be fixed:
  • Donate link: Please fix this invalid url: "paypal.me/ravigyadav123"
You can look at the official readme.txt

shape-size-calculator/size_calulator.php 92% from 13 tests

The main PHP script in "Shape Size Calculator" version 1.1.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("shape-size-calculator.php" instead of "size_calulator.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin671 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS22114515
PHP1119108
JavaScript281448

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for 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%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.PNG35.53KB17.44KB▼ 50.93%