84% genesis-style-select

Code Review | Genesis Style Select

WordPress plugin Genesis Style Select scored84%from 54 tests.

About plugin

  • Plugin page: genesis-style-select
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.3.1
  • WordPress version: 6.3.1
  • First release: Jun 14, 2010
  • Latest release: Jan 21, 2012
  • Number of updates: 13
  • Update frequency: every 47.9 days
  • Top authors: Nick_theGeek (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /10,797 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 gracefully, with no errors

Server metrics [RAM: ▼0.00MB] [CPU: ▼11.67ms] Passed 4 tests

This is a short check of server-side resources used by Genesis Style Select
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.17 ▼8.14
Dashboard /wp-admin3.31 ▼0.0348.22 ▼18.05
Posts /wp-admin/edit.php3.37 ▲0.0149.47 ▼0.63
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.48 ▼19.87
Media Library /wp-admin/upload.php3.24 ▲0.0038.22 ▲0.49

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Genesis Style Select
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.25 ▼0.411.80 ▼0.0045.01 ▲6.13
Dashboard /wp-admin2,195 ▲155.62 ▼0.0888.19 ▼3.6838.40 ▼12.22
Posts /wp-admin/edit.php2,103 ▼02.03 ▲0.0240.69 ▼0.4235.09 ▼4.88
Add New Post /wp-admin/post-new.php1,528 ▲223.18 ▲0.00670.36 ▼12.0252.39 ▲0.79
Media Library /wp-admin/upload.php1,400 ▼04.28 ▲0.10101.08 ▼1.8844.91 ▼2.06

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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 following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/genesis-style-select/admin.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/genesis-style-select/plugin.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === genesis-style-select === )
Please take inspiration from this readme.txt

genesis-style-select/plugin.php 92% from 13 tests

The main PHP script in "Genesis Style Select" version 1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("genesis-style-select.php" instead of "plugin.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
Everything looks great! No dangerous files found in this plugin52 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2271752

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin