72% wp-style-it

Code Review | WP Style It

WordPress plugin WP Style It scored72%from 54 tests.

About plugin

  • Plugin page: wp-style-it
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.9.1
  • WordPress version: 6.3.1
  • First release: Jun 17, 2014
  • Latest release: Jul 10, 2014
  • Number of updates: 5
  • Update frequency: every 4.6 days
  • Top authors: benohead (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /874 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
Install script ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▼4.34ms] Passed 4 tests

This is a short check of server-side resources used by WP Style It
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1129.15 ▼10.26
Dashboard /wp-admin3.47 ▲0.1656.90 ▼0.85
Posts /wp-admin/edit.php3.58 ▲0.2252.74 ▼2.21
Add New Post /wp-admin/post-new.php6.07 ▲0.18100.59 ▲7.00
Media Library /wp-admin/upload.php3.39 ▲0.1636.18 ▼4.04
WP Style It /wp-admin/options-general.php?page=wpsi_settings3.4532.82

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 142 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
wpsi_settings
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Style It
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,906 ▲14514.59 ▲0.215.90 ▲4.2346.88 ▲1.96
Dashboard /wp-admin2,234 ▲345.79 ▼0.06101.02 ▼19.4939.28 ▼3.17
Posts /wp-admin/edit.php2,110 ▲102.63 ▲0.5938.30 ▼4.1234.33 ▲0.11
Add New Post /wp-admin/post-new.php1,535 ▼1223.52 ▲0.16653.49 ▼2.6335.18 ▼33.51
Media Library /wp-admin/upload.php1,413 ▲135.39 ▲1.1799.42 ▼23.1245.67 ▼3.86
WP Style It /wp-admin/options-general.php?page=wpsi_settings2,3672.6469.7361.97

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

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=wpsi_settings
    • > Notice in wp-content/plugins/wp-style-it/views/wpsi-settings/page-settings-fields.php+11
    Undefined index: suppress-on-posts
    • > GET request to /wp-admin/options-general.php?page=wpsi_settings
    • > Notice in wp-content/plugins/wp-style-it/views/wpsi-settings/page-settings-fields.php+16
    Undefined index: suppress-on-pages
    • > GET request to /wp-admin/options-general.php?page=wpsi_settings
    • > Notice in wp-content/plugins/wp-style-it/views/wpsi-settings/page-settings-fields.php+21
    Undefined index: suppress-on-attachment
    • > GET request to /wp-admin/options-general.php?page=wpsi_settings
    • > Notice in wp-content/plugins/wp-style-it/views/wpsi-settings/page-settings-fields.php+26
    Undefined index: suppress-on-category
    • > GET request to /wp-admin/options-general.php?page=wpsi_settings
    • > Notice in wp-content/plugins/wp-style-it/views/wpsi-settings/page-settings-fields.php+30
    Undefined index: suppress-on-tag
    • > GET request to /wp-admin/options-general.php?page=wpsi_settings
    • > Notice in wp-content/plugins/wp-style-it/views/wpsi-settings/page-settings-fields.php+34
    Undefined index: suppress-on-home
    • > GET request to /wp-admin/options-general.php?page=wpsi_settings
    • > Notice in wp-content/plugins/wp-style-it/views/wpsi-settings/page-settings-fields.php+39
    Undefined index: suppress-on-front
    • > GET request to /wp-admin/options-general.php?page=wpsi_settings
    • > Notice in wp-content/plugins/wp-style-it/views/wpsi-settings/page-settings-fields.php+44
    Undefined index: suppress-on-archive
    • > GET request to /wp-admin/options-general.php?page=wpsi_settings
    • > Notice in wp-content/plugins/wp-style-it/views/wpsi-settings/page-settings-fields.php+54
    Undefined index: suppress-on-error
    • > GET request to /wp-admin/options-general.php?page=wpsi_settings
    • > Notice in wp-content/plugins/wp-style-it/views/wpsi-settings/page-settings-fields.php+49
    Undefined index: suppress-on-author
    • > GET request to /wp-admin/options-general.php?page=wpsi_settings
    • > Notice in wp-content/plugins/wp-style-it/views/wpsi-settings/page-settings-fields.php+64
    Undefined index: suppress-on-logged-in
    • > GET request to /wp-admin/options-general.php?page=wpsi_settings
    • > Notice in wp-content/plugins/wp-style-it/views/wpsi-settings/page-settings-fields.php+59
    Undefined index: suppress-on-wptouch

SRP 0% 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
Please take a closer look at the following
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-style-it/edit_area/edit_area_compressor.php
    • > /wp-content/plugins/wp-style-it/views/wpsi-settings/page-settings-fields.php
    • > /wp-content/plugins/wp-style-it/bootstrap.php
  • 59× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-style-it/views/wpsi-settings/page-settings-section-headers.php on line 3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-style-it/views/wpsi-settings/page-settings-fields.php on line 202
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-style-it/views/wpsi-settings/page-settings-fields.php on line 188
    • > PHP Notice
      Undefined variable: field in wp-content/plugins/wp-style-it/views/wpsi-settings/page-settings-fields.php on line 23
    • > PHP Notice
      Undefined variable: field in wp-content/plugins/wp-style-it/views/wpsi-settings/page-settings-fields.php on line 125
    • > PHP Notice
      Undefined variable: field in wp-content/plugins/wp-style-it/views/wpsi-settings/page-settings-fields.php on line 150
    • > PHP Notice
      Undefined variable: section in wp-content/plugins/wp-style-it/views/wpsi-settings/page-settings-section-headers.php on line 1
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-style-it/views/wpsi-settings/page-settings-fields.php on line 18
    • > PHP Warning
      Use of undefined constant WPSI_REQUIRED_WP_VERSION - assumed 'WPSI_REQUIRED_WP_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-style-it/views/requirements-error.php on line 11
    • > PHP Notice
      Undefined variable: field in wp-content/plugins/wp-style-it/views/wpsi-settings/page-settings-fields.php on line 66

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)
No browser issues were found

Optimizations

Plugin configuration 93% 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:
  • Screenshots: These screenshots do not have images: #1 (CSS editor), #2 (Options)
The official readme.txt might help

wp-style-it/bootstrap.php 92% from 13 tests

The main PHP script in "WP Style It" version 0.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-style-it.php" instead of "bootstrap.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
No dangerous file extensions were detected9,105 lines of code in 110 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript937681,0557,283
PHP112154181,168
CSS49522519
HTML280135

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity38.25
▷ Minimum class complexity8.00
▷ Maximum class complexity77.00
Average method complexity3.04
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes125.00%
▷ Concrete classes375.00%
▷ Final classes00.00%
Methods80
▷ Static methods1012.50%
▷ Public methods6075.00%
▷ Protected methods1113.75%
▷ Private methods911.25%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants342.86%
▷ Class constants457.14%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.36MB with 0.21MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png181.51KB54.74KB▼ 69.84%
edit_area/images/opacity.png0.14KB0.09KB▼ 34.01%
images/blank.png0.27KB0.10KB▼ 61.68%
screenshot-2.png191.23KB65.26KB▼ 65.87%