84% styleguide

Code Review | Styleguide - Custom Fonts and Colors

WordPress plugin Styleguide - Custom Fonts and Colors scored84%from 54 tests.

About plugin

  • Plugin page: styleguide
  • Plugin version: 1.8.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.2.0
  • WordPress version: 6.3.1
  • First release: Jan 10, 2015
  • Latest release: Mar 5, 2023
  • Number of updates: 42
  • Update frequency: every 70.9 days
  • Top authors: BinaryMoon (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

4,000+ active /89,949 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.12MB] [CPU: ▼6.83ms] Passed 4 tests

Server-side resources used by Styleguide - Custom Fonts and Colors
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1347.06 ▲4.91
Dashboard /wp-admin3.44 ▲0.0947.19 ▼19.99
Posts /wp-admin/edit.php3.55 ▲0.1952.20 ▲3.16
Add New Post /wp-admin/post-new.php6.02 ▲0.1388.25 ▼9.52
Media Library /wp-admin/upload.php3.36 ▲0.1338.73 ▼0.95

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Styleguide - Custom Fonts and Colors
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.22 ▼1.084.59 ▲2.6347.74 ▲5.20
Dashboard /wp-admin2,206 ▲184.87 ▼0.22113.64 ▲0.8940.87 ▼5.89
Posts /wp-admin/edit.php2,089 ▼01.98 ▼0.0742.41 ▲0.4438.23 ▲1.97
Add New Post /wp-admin/post-new.php1,534 ▲1523.22 ▲0.02629.30 ▼31.6653.57 ▼9.25
Media Library /wp-admin/upload.php1,385 ▼34.20 ▼0.13100.09 ▼5.7541.72 ▼2.51

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
  • 24× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_theme_support() in wp-content/plugins/styleguide/theme-styles/twenty-fifteen.php:56
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_theme_support() in wp-content/plugins/styleguide/theme-styles/romero.php:102
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_theme_support() in wp-content/plugins/styleguide/theme-styles/twenty-ten.php:55
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/styleguide/includes/class.styleguide.php:49
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_theme_support() in wp-content/plugins/styleguide/theme-styles/twenty-thirteen.php:143
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_theme_support() in wp-content/plugins/styleguide/theme-styles/adaline.php:75
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_theme_support() in wp-content/plugins/styleguide/theme-styles/twenty-seventeen.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_theme_support() in wp-content/plugins/styleguide/theme-styles/opti.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_theme_support() in wp-content/plugins/styleguide/theme-styles/label.php:117
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_theme_support() in wp-content/plugins/styleguide/theme-styles/monet.php:86

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: google fonts, colour, fonts, colors, customizer...

styleguide/index.php 92% from 13 tests

The primary PHP file in "Styleguide - Custom Fonts and Colors" version 1.8.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("styleguide.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin3,164 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP284036582,864
JavaScript273134225
LESS18041
CSS10034

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity22.25
▷ Minimum class complexity2.00
▷ Maximum class complexity48.00
Average method complexity2.89
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods45
▷ Static methods00.00%
▷ Public methods45100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.54MB with 0.41MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshots/screenshot-1.png553.77KB135.38KB▼ 75.55%