89% wysiwyg-calculator-block

Code Review | WYSIWYG Calculator Block

WordPress plugin WYSIWYG Calculator Block scored89%from 54 tests.

About plugin

  • Plugin page: wysiwyg-calculato...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.4
  • WordPress version: 6.3.1
  • First release: Aug 9, 2020
  • Latest release: Aug 9, 2020
  • Number of updates: 2
  • Update frequency: every 1.0 days
  • Top authors: thewatermethod (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /798 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
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by WYSIWYG Calculator Block
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.62 ▼4.40
Dashboard /wp-admin3.32 ▲0.0248.74 ▼1.88
Posts /wp-admin/edit.php3.37 ▲0.0152.42 ▲5.24
Add New Post /wp-admin/post-new.php5.90 ▲0.0284.96 ▼11.05
Media Library /wp-admin/upload.php3.24 ▲0.0138.92 ▲0.23

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by WYSIWYG Calculator Block
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.27 ▲0.092.15 ▼0.2140.47 ▼2.31
Dashboard /wp-admin2,198 ▲215.64 ▲0.0793.48 ▼4.3641.32 ▼2.11
Posts /wp-admin/edit.php2,100 ▲32.03 ▲0.0539.07 ▲1.7335.33 ▼0.49
Add New Post /wp-admin/post-new.php6,197 ▲4,67119.07 ▼4.44865.31 ▲195.5361.80 ▲5.39
Media Library /wp-admin/upload.php1,403 ▲34.13 ▼0.12101.21 ▼14.9943.32 ▼5.47

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests Passed 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 Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% 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:
  • Donate link: Invalid URI ("")
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (The calculator on the front end of a site. It inherits your sites styles.), #2 (The calculator on a different front end (identity hidden to protect the innocent), notice the different fonts.)
  • Tags: There were no tags found
The official readme.txt is a good inspiration

wysiwyg-calculator-block/plugin.php 85% from 13 tests

The main PHP file in "WYSIWYG Calculator Block" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wysiwyg-calculator-block.php" instead of "plugin.php")
  • Git Repository: An alternative Git repository was detected

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
No dangerous file extensions were detected7,990 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JSON3007,335
JavaScript758126477
Sass2241127
PHP2125850
CSS1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
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

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.10MB with 0.05MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.PNG42.38KB23.27KB▼ 45.08%
assets/screenshot-3.PNG32.82KB13.21KB▼ 59.77%
assets/screenshot-4.PNG9.42KB5.02KB▼ 46.68%
assets/screenshot-1.PNG13.46KB6.91KB▼ 48.70%