83% reset-astra-customizer

Code Review | Astra Customizer Reset

WordPress plugin Astra Customizer Reset scored83%from 54 tests.

About plugin

  • Plugin page: reset-astra-custo...
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: Jun 27, 2017
  • Latest release: Aug 21, 2023
  • Number of updates: 24
  • Update frequency: every 93.8 days
  • Top authors: brainstormworg (70.83%)Nikschavan (25%)Mahesh901122 (12.5%)

Code review

54 tests

User reviews

4 reviews

Install metrics

60,000+ active /621,361 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.32ms] Passed 4 tests

This is a short check of server-side resources used by Astra Customizer Reset
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0143.30 ▲0.93
Dashboard /wp-admin3.32 ▲0.0247.93 ▼5.68
Posts /wp-admin/edit.php3.37 ▲0.0144.59 ▼7.04
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.79 ▼19.49
Media Library /wp-admin/upload.php3.24 ▲0.0136.95 ▼1.07

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Astra Customizer Reset
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.14 ▼0.141.86 ▲0.1247.96 ▲1.90
Dashboard /wp-admin2,192 ▲185.50 ▼0.2481.21 ▼14.0336.26 ▼8.37
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0535.77 ▼1.3934.23 ▼2.84
Add New Post /wp-admin/post-new.php1,545 ▲1923.36 ▲5.54631.40 ▼11.6448.41 ▼1.29
Media Library /wp-admin/upload.php1,400 ▲34.16 ▼0.1297.86 ▼19.1846.81 ▲0.44

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
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_template() in wp-content/plugins/reset-astra-customizer/class-astra-theme-customizer-reset.php:14

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

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Visit Astra theme customizer), #2 (Astra Customizer Reset Button)
You can take inspiration from this readme.txt

reset-astra-customizer/class-astra-theme-customizer-reset.php 85% from 13 tests

The primary PHP file in "Astra Customizer Reset" version 1.0.6 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("reset-astra-customizer.php" instead of "class-astra-theme-customizer-reset.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin122 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1257072
JavaScript1152532
XML14218

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods120.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin