83% easy-enable-disable-checkout-fields

Code Review | Easy enable disable checkout fields

WordPress plugin Easy enable disable checkout fields scored83%from 54 tests.

About plugin

  • Plugin page: easy-enable-disab...
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.3-5.3
  • WordPress version: 6.3.1
  • First release: Jun 25, 2019
  • Latest release: Feb 14, 2020
  • Number of updates: 6
  • Update frequency: every 41.2 days
  • Top authors: v.chuy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /528 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼2.97ms] Passed 4 tests

This is a short check of server-side resources used by Easy enable disable checkout fields
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0541.02 ▼0.58
Dashboard /wp-admin3.38 ▲0.0845.70 ▼3.16
Posts /wp-admin/edit.php3.43 ▲0.0847.41 ▲1.45
Add New Post /wp-admin/post-new.php5.96 ▲0.0882.38 ▼9.58
Media Library /wp-admin/upload.php3.31 ▲0.0831.46 ▲1.69
Enable disable checkout fields reviews /wp-admin/options-general.php?page=endichefi_slug3.2733.32

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Easy enable disable checkout fields
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6914.48 ▲0.111.69 ▼0.2543.45 ▼2.58
Dashboard /wp-admin2,210 ▲254.84 ▼1.06111.77 ▼4.0638.17 ▼9.10
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0438.95 ▲4.2737.43 ▼0.12
Add New Post /wp-admin/post-new.php1,537 ▲2323.28 ▲5.68660.35 ▼13.9261.75 ▲3.94
Media Library /wp-admin/upload.php1,395 ▲74.28 ▲0.0696.14 ▼1.9545.39 ▲0.69
Enable disable checkout fields reviews /wp-admin/options-general.php?page=endichefi_slug8922.0223.1126.98

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

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
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-enable-disable-checkout-fields/easy-enable-disable-chekoout-fields.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Screenshots: Please add an image for screenshot #1 (screenshot-1.png)
You can take inspiration from this readme.txt

easy-enable-disable-checkout-fields/easy-enable-disable-chekoout-fields.php 85% from 13 tests

"Easy enable disable checkout fields" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("easy-enable-disable-checkout-fields.php" instead of "easy-enable-disable-chekoout-fields.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin293 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP110317173
PO File24060120

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.40
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%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.10MB with 0.08MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) screenshot-2.png52.15KB0.00KB▼ 100.00%
screenshot-1.png48.15KB21.83KB▼ 54.65%