84% zerowp-oneclick-presets

Code Review | ZeroWP OneClick Presets

WordPress plugin ZeroWP OneClick Presets scored84%from 54 tests.

About plugin

  • Plugin page: zerowp-oneclick-p...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.3.0
  • WordPress version: 6.3.1
  • First release: Jul 27, 2017
  • Latest release: Sep 12, 2019
  • Number of updates: 9
  • Update frequency: every 86.7 days
  • Top authors: _smartik_ (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /934 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.28MB] [CPU: ▼2.32ms] Passed 4 tests

Server-side resources used by ZeroWP OneClick Presets
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.3244.21 ▼0.04
Dashboard /wp-admin3.61 ▲0.3151.89 ▼1.82
Posts /wp-admin/edit.php3.67 ▲0.3155.17 ▲1.07
Add New Post /wp-admin/post-new.php6.13 ▲0.2587.90 ▼8.50
Media Library /wp-admin/upload.php3.48 ▲0.2542.74 ▲6.89

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

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

Browser metrics Passed 4 tests

A check of browser resources used by ZeroWP OneClick Presets
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲5413.61 ▼0.792.05 ▼0.3944.81 ▲2.78
Dashboard /wp-admin2,206 ▲185.83 ▼0.06103.18 ▲0.0439.38 ▼4.88
Posts /wp-admin/edit.php2,086 ▼31.97 ▼0.0836.68 ▼4.5934.52 ▼0.58
Add New Post /wp-admin/post-new.php1,533 ▲1423.22 ▲0.27608.53 ▲22.5450.11 ▼14.81
Media Library /wp-admin/upload.php1,391 ▲64.14 ▼0.10101.31 ▼2.7545.51 ▼1.37

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 21× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ZeroWpOneClickPresets\\Ajax' not found in wp-content/plugins/zerowp-oneclick-presets/components/SetupSystem/component.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/zerowp-oneclick-presets/components/ScriptsAndStyles/component.php:7
    • > PHP Fatal error
      require_once(): Failed opening required 'ZWPC_PRESETS_PATHwarnings/abstract-warning.php' (include_path='.:/usr/share/php') in wp-content/plugins/zerowp-oneclick-presets/warnings/php-warning.php on line 2
    • > PHP Warning
      Use of undefined constant ZWPC_PRESETS_PATH - assumed 'ZWPC_PRESETS_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/zerowp-oneclick-presets/plugin.php on line 225
    • > PHP Warning
      include_once(): Failed opening 'ZWPC_PRESETS_PATHautoloader.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/zerowp-oneclick-presets/plugin.php on line 87
    • > PHP Fatal error
      Uncaught Error: Class 'ZeroWpOneClickPresets\\Access' not found in wp-content/plugins/zerowp-oneclick-presets/engine/Import.class.php:6
    • > PHP Warning
      include_once(ZWPC_PRESETS_PATHfunctions.php): failed to open stream: No such file or directory in wp-content/plugins/zerowp-oneclick-presets/plugin.php on line 88
    • > PHP Fatal error
      Uncaught Error: Class 'ZeroWpOneClickPresets\\Assets\\Manage' not found in wp-content/plugins/zerowp-oneclick-presets/plugin.php:90
    • > PHP Fatal error
      Uncaught Error: Class 'ZeroWpOneClickPresets\\Access' not found in wp-content/plugins/zerowp-oneclick-presets/engine/Download.class.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/zerowp-oneclick-presets/engine/ControlBase.class.php:4

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === zerowp-oneclick-presets === )
  • Screenshots: Add descriptions for screenshots #1, #2, #3, #4, #5 in zerowp-oneclick-presets/assets to your readme.txt
You can take inspiration from this readme.txt

zerowp-oneclick-presets/zerowp-oneclick-presets.php Passed 13 tests

This is the main PHP file of "ZeroWP OneClick Presets" version 1.1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
73 characters long description:
Backup, Import, Export, Live Preview a set of settings from WP customizer

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 detected2,638 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP234494341,306
LESS3117104908
JavaScript28437311
CSS32182
JSON10031

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity8.28
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity2.13
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes18
▷ Abstract classes15.56%
▷ Concrete classes1794.44%
▷ Final classes211.76%
Methods117
▷ Static methods21.71%
▷ Public methods11194.87%
▷ Protected methods65.13%
▷ Private methods00.00%
Functions6
▷ Named functions466.67%
▷ Anonymous functions233.33%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin