84% styles-twentyfourteen

Code Review | Styles: TwentyFourteen

WordPress plugin Styles: TwentyFourteen scored 84% from 54 tests.

About plugin

  • Plugin page: styles-twentyfour...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.9
  • WordPress version: 5.8.1
  • First release: Mar 5, 2014
  • Latest release: Apr 17, 2014
  • Number of updates: 11
  • Update frequency: every 4.0 days
  • Top authors: ZGani (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

4,000+ active / 42,827 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼0.83MB] [CPU: ▼173.73ms] Passed 4 tests

Server-side resources used by Styles: TwentyFourteen
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0027.57 ▲4.85
Dashboard /wp-admin2.82 ▼0.2416.20 ▼28.53
Posts /wp-admin/edit.php2.82 ▼0.2817.28 ▼15.89
Add New Post /wp-admin/post-new.php2.82 ▼2.6215.59 ▼640.45
Media Library /wp-admin/upload.php2.82 ▼0.1815.10 ▼10.04

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Styles: TwentyFourteen
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲7816.00 ▲0.366.75 ▼0.5170.81 ▼5.65
Dashboard /wp-admin2,939 ▲436.14 ▼0.01112.33 ▼17.23164.82 ▼6.65
Posts /wp-admin/edit.php2,755 ▲123.24 ▲0.0263.15 ▼5.54138.19 ▼2.49
Add New Post /wp-admin/post-new.php3,751 ▲818.62 ▼0.23443.59 ▲4.14159.27 ▼0.50
Media Library /wp-admin/upload.php1,764 ▲95.54 ▲0.02155.37 ▲0.46185.11 ▼1.01

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
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/styles-twentyfourteen/classes/styles-child-notices/styles-child-notices.php+271
    compact(): Undefined variable: required_version

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 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-twentyfourteen/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-twentyfourteen/classes/styles-child-notices/styles-child-notices.php:42

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
You can take inspiration from this readme.txt

styles-twentyfourteen/styles-twentyfourteen.php 92% from 13 tests

This is the main PHP file of "Styles: TwentyFourteen" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 241 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin569 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JSON100326
PHP266138179
Markdown126046
JavaScript15315
CSS1013

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected