78% ijm-theme-bar

Code Review | IJM Theme Switcher Bar

WordPress plugin IJM Theme Switcher Bar scored78%from 54 tests.

About plugin

  • Plugin page: ijm-theme-bar
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-3.7.1
  • WordPress version: 6.3.1
  • First release: Oct 30, 2013
  • Latest release: Dec 3, 2013
  • Number of updates: 37
  • Update frequency: every 0.9 days
  • Top authors: ijmccallum (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

20+ active /4,976 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼11.25ms] Passed 4 tests

This is a short check of server-side resources used by IJM Theme Switcher Bar
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.10 ▼3.30
Dashboard /wp-admin3.37 ▲0.0244.99 ▼11.40
Posts /wp-admin/edit.php3.42 ▲0.0648.63 ▼2.26
Add New Post /wp-admin/post-new.php5.95 ▲0.0680.14 ▼28.05
Media Library /wp-admin/upload.php3.29 ▲0.0636.60 ▲1.68
IJM Theme bar /wp-admin/options-general.php?page=ijmtb_Menu_ID3.2633.10

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

IJM Theme Switcher Bar: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲6613.21 ▼1.224.60 ▲2.8839.62 ▼3.70
Dashboard /wp-admin2,210 ▲185.84 ▲0.93104.24 ▼10.5640.76 ▼2.10
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0442.82 ▲1.7535.50 ▼0.55
Add New Post /wp-admin/post-new.php1,516 ▲222.81 ▲5.31682.19 ▼10.7059.57 ▲4.76
Media Library /wp-admin/upload.php1,392 ▲44.20 ▼0.0195.48 ▼4.7341.96 ▼2.73
IJM Theme bar /wp-admin/options-general.php?page=ijmtb_Menu_ID8302.1032.0726.74

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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 fix the following items
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ijm-theme-bar/ijm-theme-bar-html.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ijm-theme-bar/ijm-theme-bar-css.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ijm-theme-bar/ijm-theme-bar-html.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ijm-theme-bar/ijm-theme-bar-options.php:7

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=ijmtb_Menu_ID
    • > Network (severe)
    wp-content/plugins/ijm-theme-bar-pro/ijmtb_colour.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
You can look at the official readme.txt

ijm-theme-bar/ijm-theme-bar.php Passed 13 tests

The primary PHP file in "IJM Theme Switcher Bar" version 2.0 is used by WordPress to initiate all plugin functionality
107 characters long description:
Add a theme switcher / theme demo bar to your site. Allows users to switch the theme they see on your site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin286 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP46881260
JavaScript18026

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.21
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%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin