84% theme-changer

Code Review | Theme Changer

WordPress plugin Theme Changer scored84%from 54 tests.

About plugin

  • Plugin page: theme-changer
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.8
  • WordPress version: 6.3.1
  • First release: Dec 28, 2014
  • Latest release: Jun 30, 2017
  • Number of updates: 10
  • Update frequency: every 91.5 days
  • Top authors: momen2009 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,037 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.35MB] [CPU: ▼13.90ms] Passed 4 tests

This is a short check of server-side resources used by Theme Changer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.405.04 ▼32.53
Dashboard /wp-admin3.31 ▲0.0144.70 ▼0.31
Posts /wp-admin/edit.php3.36 ▲0.0042.95 ▼4.38
Add New Post /wp-admin/post-new.php5.89 ▲0.0078.16 ▼18.39
Media Library /wp-admin/upload.php3.23 ▲0.0036.04 ▲3.98
Theme Changer Options /wp-admin/options-general.php?page=theme-changer-options3.2028.94

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

Browser metrics Passed 4 tests

An overview of browser requirements for Theme Changer
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6213.16 ▼1.232.13 ▲0.5244.91 ▲5.09
Dashboard /wp-admin2,207 ▲195.77 ▲0.8898.70 ▼6.1941.97 ▲0.78
Posts /wp-admin/edit.php2,090 ▲12.00 ▼0.0538.93 ▼1.3536.09 ▲2.09
Add New Post /wp-admin/post-new.php1,540 ▲2621.94 ▲4.34645.57 ▲0.9851.67 ▼1.64
Media Library /wp-admin/upload.php1,395 ▲74.19 ▼0.1098.97 ▼0.3644.60 ▲4.23
Theme Changer Options /wp-admin/options-general.php?page=theme-changer-options7802.0324.7725.81

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 does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

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 | 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 take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/theme-changer/theme-changer.php:93

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
5 plugin tags: theme, demo, parameter, change, get

theme-changer/theme-changer.php 92% from 13 tests

The primary PHP file in "Theme Changer" version 1.3 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 236 characters long)

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 plugin128 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12121128

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin