90% browsers

Code Review | Conditional Stylesheets and Body Classes

WordPress plugin Conditional Stylesheets and Body Classes scored90%from 54 tests.

About plugin

  • Plugin page: browsers
  • Plugin version: 0.4.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.4.1
  • WordPress version: 6.3.1
  • First release: Dec 10, 2013
  • Latest release: Jan 17, 2016
  • Number of updates: 42
  • Update frequency: every 18.3 days
  • Top authors: qlstudio (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /2,803 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▲0.62ms] Passed 4 tests

This is a short check of server-side resources used by Conditional Stylesheets and Body Classes
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1845.61 ▲1.26
Dashboard /wp-admin3.36 ▲0.0648.58 ▼0.61
Posts /wp-admin/edit.php3.48 ▲0.1248.16 ▲0.10
Add New Post /wp-admin/post-new.php5.95 ▲0.06105.00 ▲10.21
Media Library /wp-admin/upload.php3.29 ▲0.0636.49 ▲1.72

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Conditional Stylesheets and Body Classes
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲6813.29 ▼1.064.09 ▲2.2141.15 ▼0.42
Dashboard /wp-admin2,218 ▲125.82 ▼0.0799.52 ▼4.5740.19 ▼3.50
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0240.09 ▼0.0837.28 ▲0.49
Add New Post /wp-admin/post-new.php1,540 ▲1423.26 ▲5.70602.47 ▼54.9960.87 ▲9.27
Media Library /wp-admin/upload.php1,394 ▼64.20 ▲0.03101.10 ▲3.7343.39 ▼4.07

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
8 plugin tags: stylesheets, browsers, ie, clients, css...

browsers/browsers.php 92% from 13 tests

The main PHP script in "Conditional Stylesheets and Body Classes" version 0.4.7 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin806 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2252672709
Markdown144077
PO File11120

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.92
Average class complexity102.00
▷ Minimum class complexity87.00
▷ Maximum class complexity117.00
Average method complexity4.31
▷ Minimum method complexity1.00
▷ Maximum method complexity63.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods61
▷ Static methods11.64%
▷ Public methods5996.72%
▷ Protected methods00.00%
▷ Private methods23.28%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants225.00%
▷ Class constants675.00%
▷ Public constants6100.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
There are no PNG files in this plugin