83% best-configuration

Code Review | Best Configuration

WordPress plugin Best Configuration scored83%from 54 tests.

About plugin

  • Plugin page: best-configuration
  • Plugin version: 0.7.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-5.8
  • WordPress version: 6.3.1
  • First release: Nov 8, 2016
  • Latest release: Sep 7, 2021
  • Number of updates: 24
  • Update frequency: every 73.4 days
  • Top authors: gfazioli (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,293 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Best Configuration
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.02 ▲0.5246.79 ▲6.56
Dashboard /wp-admin3.89 ▲0.5553.08 ▲1.46
Posts /wp-admin/edit.php3.94 ▲0.5555.77 ▼1.43
Add New Post /wp-admin/post-new.php6.48 ▲0.5596.74 ▼11.82
Media Library /wp-admin/upload.php3.82 ▲0.5540.84 ▲3.33
Dashboard /wp-admin/admin.php?page=bestconfiguration_13.9836.70
Widgets /wp-admin/admin.php?page=bestconfiguration_43.9739.95
General /wp-admin/admin.php?page=best_configuration_slug_menu3.9838.56
Comments /wp-admin/admin.php?page=bestconfiguration_23.9737.95
Posts /wp-admin/admin.php?page=bestconfiguration_33.9839.12

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 163 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
best_configuration_slug
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Best Configuration
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲6614.72 ▲0.371.74 ▲0.1040.90 ▼4.78
Dashboard /wp-admin2,228 ▲515.56 ▼0.1287.48 ▼2.4537.81 ▼4.70
Posts /wp-admin/edit.php2,139 ▲392.02 ▲0.0335.13 ▼3.9532.42 ▼5.63
Add New Post /wp-admin/post-new.php1,557 ▲3121.83 ▼1.71676.66 ▲11.8756.56 ▲0.68
Media Library /wp-admin/upload.php1,439 ▲364.18 ▲0.01113.23 ▲7.7147.54 ▲2.52
Dashboard /wp-admin/admin.php?page=bestconfiguration_11,1022.0124.2133.34
Widgets /wp-admin/admin.php?page=bestconfiguration_48842.0123.8028.89
General /wp-admin/admin.php?page=best_configuration_slug_menu9552.0425.3630.18
Comments /wp-admin/admin.php?page=bestconfiguration_29062.0431.8939.06
Posts /wp-admin/admin.php?page=bestconfiguration_31,1482.0023.1830.07

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
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • best_configuration_slug
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, 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
The following issues need your attention
  • 28× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'BestConfiguration\\WPBones\\Html\\HtmlTag' not found in wp-content/plugins/best-configuration/vendor/wpbones/wpbones/src/Html/HtmlTagInput.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'BestConfiguration\\WPBones\\Html\\HtmlTagInput' not found in wp-content/plugins/best-configuration/vendor/wpbones/wpbones/src/Html/HtmlTagCheckbox.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'BestConfiguration\\WPBones\\Support\\ServiceProvider' not found in wp-content/plugins/best-configuration/plugin/Providers/BestConfigurationProvider.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'BestConfiguration\\Providers\\BestConfigurationController' not found in wp-content/plugins/best-configuration/plugin/Providers/BestConfigurationManager.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'BestConfiguration\\WPBones\\Html\\HtmlTag' not found in wp-content/plugins/best-configuration/vendor/wpbones/wpbones/src/Html/HtmlTagLabel.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'BestConfiguration\\WPBones\\Html\\HtmlTag' not found in wp-content/plugins/best-configuration/vendor/wpbones/wpbones/src/Html/HtmlTagOptGroup.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function flush_rewrite_rules() in wp-content/plugins/best-configuration/plugin/deactivation.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'BestConfiguration\\WPBones\\Html\\HtmlTag' not found in wp-content/plugins/best-configuration/vendor/wpbones/wpbones/src/Html/HtmlTagButton.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'BestConfiguration\\WPBones\\Html\\HtmlTag' not found in wp-content/plugins/best-configuration/vendor/wpbones/wpbones/src/Html/HtmlTagSelect.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'BestConfiguration\\WPBones\\Foundation\\WordPressAjaxServiceProvider' not found in wp-content/plugins/best-configuration/plugin/Ajax/BestConfigurationAjax.php:7

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: settings, rest api, dashboard, backend, json...

best-configuration/index.php 77% from 13 tests

Analyzing the main PHP file in "Best Configuration" version 0.7.0
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("best-configuration.php" instead of "index.php")
  • Domain Path: Please prefix the domain path with a forward slash character ("/localization")
  • Domain Path: Use only dashes and lowercase characters for the domain path ("localization")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected7,014 lines of code in 124 files:
LanguageFilesBlank linesComment linesLines of code
PHP851,3432,2545,187
CSS151119501
Markdown71650387
LESS55618360
JSON500272
PO File2113196217
JavaScript5221390

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity9.64
▷ Minimum class complexity1.00
▷ Maximum class complexity82.00
Average method complexity2.53
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces22
Interfaces2
Traits0
Classes51
▷ Abstract classes1019.61%
▷ Concrete classes4180.39%
▷ Final classes00.00%
Methods282
▷ Static methods5820.57%
▷ Public methods22880.85%
▷ Protected methods4415.60%
▷ Private methods103.55%
Functions42
▷ Named functions1433.33%
▷ Anonymous functions2866.67%
Constants2
▷ Global constants2100.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
9 compressed PNG files occupy 0.36MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-3.png16.18KB16.65KB0.00%
assets/icon-256x256.png4.41KB4.67KB0.00%
assets/screenshot-2.png26.55KB27.39KB0.00%
assets/screenshot-4.png13.30KB13.77KB0.00%
assets/screenshot-1.png10.18KB10.09KB▼ 0.83%