83% style-genre

Code Review | Style Genre

WordPress plugin Style Genre scored83%from 54 tests.

About plugin

  • Plugin page: style-genre
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.8.1
  • WordPress version: 6.3.1
  • First release: Oct 1, 2021
  • Latest release: Oct 2, 2021
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: janiko (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /276 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▲3.84ms] Passed 4 tests

This is a short check of server-side resources used by Style Genre
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0144.60 ▲7.08
Dashboard /wp-admin3.32 ▲0.0262.51 ▲16.19
Posts /wp-admin/edit.php3.37 ▲0.0248.39 ▲1.58
Add New Post /wp-admin/post-new.php5.90 ▲0.0296.01 ▲0.39
Media Library /wp-admin/upload.php3.25 ▲0.0240.24 ▲6.32
Style Genre /wp-admin/options-general.php?page=style-genre-setting-admin3.2135.10

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
style_genre_option
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Style Genre: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.24 ▼0.281.73 ▲0.1644.99 ▲3.67
Dashboard /wp-admin2,199 ▲275.61 ▼0.1196.00 ▼1.9742.73 ▲1.87
Posts /wp-admin/edit.php2,101 ▲42.00 ▲0.0133.05 ▼2.7235.42 ▼2.37
Add New Post /wp-admin/post-new.php1,531 ▼623.38 ▲5.15682.49 ▲57.9462.82 ▼7.01
Media Library /wp-admin/upload.php1,407 ▲44.22 ▼0.1793.16 ▼5.2845.93 ▲1.72
Style Genre /wp-admin/options-general.php?page=style-genre-setting-admin8472.0023.1827.98

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • style_genre_option
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% 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 take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/style-genre/class.style-genre-admin.php:205

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: gettext, inclusion, translation

style-genre/style-genre.php 77% from 13 tests

The entry point to "Style Genre" version 1.0.1 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Requires PHP: Required version does not match the one declared in readme.txt ("7.0" instead of "7.2")
  • Requires at least: Required version does not match the one declared in readme.txt ("4.7" instead of "5.2")
  • 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 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin184 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP272120156
PO File18528

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity4.00
▷ Minimum class complexity2.00
▷ Maximum class complexity6.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin