10% remove-checkout-fields

Code Review | Remove Checkout Fields

WordPress plugin Remove Checkout Fields scored10%from 54 tests.

About plugin

  • Plugin page: remove-checkout-f...
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.5
  • WordPress version: 6.3.1
  • First release: Aug 15, 2020
  • Latest release: Aug 15, 2020
  • Number of updates: 3
  • Update frequency: every 3.7 days
  • Top authors: ahmad22 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active /905 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/remove-checkout-fields/index.php+68
    Undefined variable: userfName

Server metrics [RAM: ▲0.06MB] [CPU: ▼2.12ms] Passed 4 tests

Analyzing server-side resources used by Remove Checkout Fields
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0639.56 ▲2.32
Dashboard /wp-admin3.36 ▲0.0645.56 ▼0.60
Posts /wp-admin/edit.php3.41 ▲0.0548.57 ▲3.73
Add New Post /wp-admin/post-new.php5.96 ▲0.0792.44 ▼6.80
Media Library /wp-admin/upload.php3.29 ▲0.0533.26 ▼3.38
Remove Checkout fields /wp-admin/options-general.php?page=RemoveCheckoutFieldsAdminMainPage3.2632.27

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 92 new files
Database: 1 new table, 7 new options
New tables
wp_checkout_remove
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
test_db_version
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Remove Checkout Fields
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲4213.22 ▼1.161.70 ▼0.3541.81 ▼1.95
Dashboard /wp-admin2,222 ▲344.89 ▲0.01100.86 ▼11.6036.95 ▼4.88
Posts /wp-admin/edit.php2,099 ▲102.03 ▲0.0335.51 ▼4.4829.28 ▼2.36
Add New Post /wp-admin/post-new.php1,536 ▲1718.11 ▼4.99614.50 ▼36.1257.57 ▼2.18
Media Library /wp-admin/upload.php1,401 ▲134.19 ▲0.0297.06 ▼7.1937.48 ▼7.34
Remove Checkout fields /wp-admin/options-general.php?page=RemoveCheckoutFieldsAdminMainPage9152.0423.7533.60

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_checkout_remove
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • test_db_version
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

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
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/remove-checkout-fields/admin/admin.php:14

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

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention: You can look at the official readme.txt

remove-checkout-fields/index.php 92% from 13 tests

The main PHP file in "Remove Checkout Fields" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("remove-checkout-fields.php" instead of "index.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
Good job! No executable or dangerous file extensions detected17,824 lines of code in 44 files:
LanguageFilesBlank linesComment linesLines of code
CSS64441157,572
SVG2003,356
Sass1638373,238
LESS1638493,226
PHP2142350
JavaScript271782

PHP code Passed 2 tests

A short review of 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.22
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%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
9 PNG files occupy 0.09MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/sale.png16.24KB6.06KB▼ 62.66%
admin/images/count1/imglike1.png8.26KB3.46KB▼ 58.11%
admin/images/count7/img.png14.06KB8.68KB▼ 38.27%
admin/images/count13/back13.png3.05KB1.44KB▼ 52.77%
admin/images/count2/btn-like2.png10.22KB5.44KB▼ 46.77%