10% azurecurve-theme-switcher

Code Review | azurecurve Theme Switcher

WordPress plugin azurecurve Theme Switcher scored10%from 54 tests.

About plugin

  • Plugin page: azurecurve-theme-...
  • Plugin version: 2.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-5.0.0
  • WordPress version: 6.3.1
  • First release: Aug 9, 2018
  • Latest release: Jan 3, 2019
  • Number of updates: 8
  • Update frequency: every 18.4 days
  • Top authors: azurecurve (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /910 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/azurecurve-theme-switcher/azurecurve-theme-switcher.php+97
    Methods with the same name as their class will not be constructors in a future version of PHP; azc_ts_ThemeSwitcher has a deprecated constructor

Server metrics [RAM: ▼1.72MB] [CPU: ▼58.47ms] Passed 4 tests

Analyzing server-side resources used by azurecurve Theme Switcher
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.29 ▼1.188.60 ▼42.54
Dashboard /wp-admin2.30 ▼1.0512.45 ▼51.44
Posts /wp-admin/edit.php2.30 ▼1.0612.95 ▼44.61
Add New Post /wp-admin/post-new.php2.30 ▼3.5911.28 ▼95.27
Media Library /wp-admin/upload.php2.30 ▼0.9312.47 ▼24.03
Theme Switcher /wp-admin/admin.php?page=azc-ts2.3012.75
Plugins /wp-admin/admin.php?page=azc-plugin-menus2.3010.44

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_azc-ts-theme-switcher-widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for azurecurve Theme Switcher
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲8213.25 ▼0.944.41 ▲2.5842.79 ▼1.79
Dashboard /wp-admin2,222 ▲344.90 ▲0.02105.40 ▼0.9465.56 ▲27.72
Posts /wp-admin/edit.php2,120 ▲282.02 ▲0.0134.49 ▼6.3032.48 ▼4.97
Add New Post /wp-admin/post-new.php1,538 ▲217.58 ▼5.60688.55 ▲56.0256.59 ▼1.25
Media Library /wp-admin/upload.php1,416 ▲284.24 ▲0.01114.09 ▲3.8648.96 ▲3.91
Theme Switcher /wp-admin/admin.php?page=azc-ts8032.0725.8625.18
Plugins /wp-admin/admin.php?page=azc-plugin-menus8502.0727.0028.70

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 did not uninstall without warnings or errors
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in azc_ts_ThemeSwitcherWidget is deprecated since version 4.3.0! Use __construct() instead.
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_azc-ts-theme-switcher-widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=azc-plugin-menus
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in azc_ts_ThemeSwitcherWidget is deprecated since version 4.3.0! Use __construct() instead.

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
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/azurecurve-theme-switcher/includes/menu.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/azurecurve-theme-switcher/includes/menu.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: themes, classicpress, switching, wordpress, switcher...

azurecurve-theme-switcher/azurecurve-theme-switcher.php 85% from 13 tests

The entry point to "azurecurve Theme Switcher" version 2.2.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin417 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP25932401
CSS10216

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity19.50
▷ Minimum class complexity4.00
▷ Maximum class complexity35.00
Average method complexity4.36
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/Favicon-16x16.png0.40KB0.34KB▼ 14.81%