83% shortcode-for-my-mitsu-estimation-form

Code Review | Shortcode for My Mitsu Estimation Form

WordPress plugin Shortcode for My Mitsu Estimation Form scored83%from 54 tests.

About plugin

  • Plugin page: shortcode-for-my-...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-5.2.2
  • WordPress version: 6.3.1
  • First release: Mar 13, 2017
  • Latest release: Aug 3, 2019
  • Number of updates: 17
  • Update frequency: every 51.1 days
  • Top authors: ounziw (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,154 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

Server-side resources used by Shortcode for My Mitsu Estimation Form
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.89 ▼0.70
Dashboard /wp-admin3.31 ▲0.0149.23 ▼2.47
Posts /wp-admin/edit.php3.36 ▲0.0146.50 ▼12.13
Add New Post /wp-admin/post-new.php5.89 ▲0.0192.53 ▼13.44
Media Library /wp-admin/upload.php3.23 ▲0.0033.58 ▼1.33
Estimation Form /wp-admin/plugins.php?page=shortcode-my-mitsu3.2034.25

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Shortcode for My Mitsu Estimation Form
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.21 ▼1.094.73 ▲2.8540.13 ▼1.73
Dashboard /wp-admin2,213 ▲225.85 ▲0.8399.85 ▼3.0839.72 ▼8.00
Posts /wp-admin/edit.php2,096 ▲72.02 ▲0.0536.00 ▼7.4032.89 ▼4.79
Add New Post /wp-admin/post-new.php1,522 ▲323.32 ▼0.03624.79 ▲14.5344.14 ▼4.03
Media Library /wp-admin/upload.php1,392 ▲14.31 ▲0.1296.21 ▼5.9543.02 ▼5.43
Estimation Form /wp-admin/plugins.php?page=shortcode-my-mitsu1,4909.28278.24181.41

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

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
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 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/shortcode-for-my-mitsu-estimation-form/mymitsuphp.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (This plugin outputs an iframe.) image missing
The official readme.txt is a good inspiration

shortcode-for-my-mitsu-estimation-form/mymitsuphp.php 85% from 13 tests

The main PHP file in "Shortcode for My Mitsu Estimation Form" ver. 1.3 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 145 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("shortcode-for-my-mitsu-estimation-form.php" instead of "mymitsuphp.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin129 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PO File1151571
PHP1111658

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.14
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%
Functions4
▷ Named functions4100.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.13MB with 0.09MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png134.85KB40.11KB▼ 70.26%