73% styles-twentyfifteen

Code Review | Styles: TwentyFifteen

WordPress plugin Styles: TwentyFifteen scored 73% from 54 tests.

About plugin

  • Plugin page: styles-twentyfifteen
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.4.2
  • WordPress version: 6.3.1
  • First release: Jan 16, 2015
  • Latest release: Apr 6, 2016
  • Number of updates: 17
  • Update frequency: every 26.3 days
  • Top authors: dimitris33 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active / 6,547 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.90MB] [CPU: ▼35.34ms] Passed 4 tests

Server-side resources used by Styles: TwentyFifteen
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.61 ▼6.11
Dashboard /wp-admin3.04 ▼0.2623.17 ▼25.93
Posts /wp-admin/edit.php3.04 ▼0.3222.60 ▼24.92
Add New Post /wp-admin/post-new.php3.04 ▼2.8525.55 ▼83.01
Media Library /wp-admin/upload.php3.04 ▼0.1924.74 ▼7.51

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Styles: TwentyFifteen
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲9913.67 ▼0.961.91 ▲0.0739.71 ▼4.63
Dashboard /wp-admin2,215 ▲245.80 ▼0.0894.71 ▼3.3942.43 ▲0.01
Posts /wp-admin/edit.php2,097 ▲82.00 ▼0.0135.83 ▲0.8633.42 ▼0.86
Add New Post /wp-admin/post-new.php1,542 ▲2823.36 ▲5.77645.52 ▲9.0759.47 ▲8.61
Media Library /wp-admin/upload.php1,397 ▲124.23 ▲0.0395.71 ▼7.4941.13 ▼5.81

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/styles-twentyfifteen/classes/styles-child-notices/styles-child-notices.php+271
    compact(): Undefined variable: required_version
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

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)
Good news, no errors were detected

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
The following issues need your attention
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/styles-twentyfifteen/classes/styles-child-notices/styles-child-notices.php:42
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/styles-twentyfifteen/classes/styles-child-notices/styles-child-notices.php:42

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
The official readme.txt is a good inspiration

styles-twentyfifteen/plugin.php 85% from 13 tests

Analyzing the main PHP file in "Styles: TwentyFifteen" version 1.0
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 226 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("styles-twentyfifteen.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected620 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JSON1150377
PHP265115179
Markdown126046
JavaScript15315
CSS1013

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity33.00
▷ Minimum class complexity33.00
▷ Maximum class complexity33.00
Average method complexity3.13
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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