79% theme-independent-stylesheets

Code Review | Theme-Independent Stylesheets

WordPress plugin Theme-Independent Stylesheets scored79%from 54 tests.

About plugin

  • Plugin page: theme-independent...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Feb 11, 2015
  • Latest release: Feb 7, 2018
  • Number of updates: 28
  • Update frequency: every 39.0 days
  • Top authors: jshoptaw (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,287 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.10MB] [CPU: ▼12.99ms] Passed 4 tests

An overview of server-side resources used by Theme-Independent Stylesheets
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0234.01 ▼8.17
Dashboard /wp-admin3.43 ▲0.1346.31 ▼2.41
Posts /wp-admin/edit.php3.54 ▲0.1947.66 ▼13.77
Add New Post /wp-admin/post-new.php6.01 ▲0.1381.47 ▼24.17
Media Library /wp-admin/upload.php3.35 ▲0.1335.04 ▼5.83
Theme-Independent Stylesheets /wp-admin/options-general.php?page=tissheets_options3.3333.73

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
tissheets_settings
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Theme-Independent Stylesheets: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.34 ▼0.011.60 ▼0.2442.28 ▲2.36
Dashboard /wp-admin2,199 ▲195.57 ▼0.0879.97 ▼3.9437.38 ▼7.89
Posts /wp-admin/edit.php2,104 ▼32.03 ▼0.0040.12 ▲0.2337.13 ▲0.76
Add New Post /wp-admin/post-new.php1,530 ▲423.28 ▼0.41652.42 ▲32.0358.94 ▼1.09
Media Library /wp-admin/upload.php1,401 ▲44.17 ▲0.0393.60 ▼10.7141.78 ▲0.44
Theme-Independent Stylesheets /wp-admin/options-general.php?page=tissheets_options1,2482.0022.1129.68

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • tissheets_settings
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/theme-independent-stylesheets/theme-independent-stylesheets.php
    • > /wp-content/plugins/theme-independent-stylesheets/inc/classes/class-tissheets-settings.php
    • > /wp-content/plugins/theme-independent-stylesheets/inc/classes/class-tissheets-plugin-functions.php
  • 11× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/theme-independent-stylesheets/inc/help/help-ie-conditional-comment.php:1
    • > PHP Notice
      Undefined variable: plugin_basename in wp-content/plugins/theme-independent-stylesheets/inc/definitions.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/theme-independent-stylesheets/inc/help/help-load-order.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/theme-independent-stylesheets/inc/definitions.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/theme-independent-stylesheets/inc/help/help-name.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/theme-independent-stylesheets/inc/help/help-version.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/theme-independent-stylesheets/uninstall.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/theme-independent-stylesheets/inc/help/help-external-or-inline.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/theme-independent-stylesheets/inc/help/help-active.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/theme-independent-stylesheets/inc/help/help-handle.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: theme, stylesheet, css, stylesheets, independent

theme-independent-stylesheets/theme-independent-stylesheets.php Passed 13 tests

The main PHP script in "Theme-Independent Stylesheets" version 1.1.0 is automatically included on every request by WordPress
82 characters long description:
Allows for use of uploaded stylesheets (.css files) to be used alongside any theme

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin811 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP14211105715
CSS122696

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity58.00
▷ Minimum class complexity26.00
▷ Maximum class complexity90.00
Average method complexity5.96
▷ Minimum method complexity1.00
▷ Maximum method complexity56.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods23
▷ Static methods834.78%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
No PNG images were found in this plugin