84% theme-reset

Code Review | Theme Reset

WordPress plugin Theme Reset scored84%from 54 tests.

About plugin

  • Plugin page: theme-reset
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.2
  • WordPress version: 6.3.1
  • First release: Feb 3, 2014
  • Latest release: Apr 21, 2015
  • Number of updates: 4
  • Update frequency: every 110.7 days
  • Top authors: MrWiblog (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,810 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.00MB] [CPU: ▼5.35ms] Passed 4 tests

An overview of server-side resources used by Theme Reset
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0136.09 ▼7.27
Dashboard /wp-admin3.31 ▲0.0149.11 ▼3.64
Posts /wp-admin/edit.php3.36 ▲0.0047.05 ▲0.30
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.88 ▼8.99
Media Library /wp-admin/upload.php3.23 ▲0.0032.69 ▼1.48

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Theme Reset
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.19 ▼1.391.94 ▲0.0540.61 ▼7.35
Dashboard /wp-admin2,206 ▲184.86 ▼0.02109.37 ▼0.0738.24 ▼2.11
Posts /wp-admin/edit.php2,092 ▲32.00 ▼0.0438.44 ▼0.7134.62 ▼2.48
Add New Post /wp-admin/post-new.php1,533 ▼123.15 ▼0.05656.67 ▼28.9255.34 ▼3.26
Media Library /wp-admin/upload.php1,388 ▼04.16 ▼0.0694.32 ▼4.7941.36 ▼4.91

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/theme-reset/theme-reset.php:41

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 on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: reset, theme, multisite

theme-reset/theme-reset.php Passed 13 tests

"Theme Reset" version 0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
53 characters long description:
Resets the theme in all sites in a MultiSite network.

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
Everything looks great! No dangerous files found in this plugin89 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1396089

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.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