78% sitewide-coloring

Code Review | Sitewide Coloring

WordPress plugin Sitewide Coloring scored78%from 54 tests.

About plugin

  • Plugin page: sitewide-coloring
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.5.2
  • WordPress version: 6.3.1
  • First release: Mar 24, 2016
  • Latest release: Jun 6, 2016
  • Number of updates: 8
  • Update frequency: every 10.4 days
  • Top authors: Mobilunity.com (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,287 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.13MB] [CPU: ▼4.33ms] Passed 4 tests

An overview of server-side resources used by Sitewide Coloring
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.88 ▲0.4250.25 ▲10.28
Dashboard /wp-admin3.38 ▲0.0347.05 ▼12.14
Posts /wp-admin/edit.php3.49 ▲0.1344.01 ▼1.19
Add New Post /wp-admin/post-new.php6.20 ▲0.3198.00 ▼2.38
Media Library /wp-admin/upload.php3.30 ▲0.0732.87 ▼1.61

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 43 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Sitewide Coloring
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲5913.29 ▼1.331.92 ▼0.0949.88 ▲6.91
Dashboard /wp-admin2,231 ▲405.86 ▲0.95105.59 ▼5.4554.36 ▲15.01
Posts /wp-admin/edit.php2,117 ▲312.08 ▲0.0335.77 ▲0.8346.10 ▲12.07
Add New Post /wp-admin/post-new.php1,539 ▲623.22 ▼0.13782.89 ▲71.6462.21 ▲0.25
Media Library /wp-admin/upload.php1,419 ▲284.26 ▲0.0399.13 ▼2.6556.03 ▲12.25

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/sitewide-coloring/lib/MobileDetect/export/exportToJSON.php
  • 12× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'SiteWideColoring\\App\\Service\\AbstractService' not found in wp-content/plugins/sitewide-coloring/services/Settings.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'SiteWideColoring\\App\\Registry\\RegistryAwareInterface' not found in wp-content/plugins/sitewide-coloring/app/View/Layout.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/sitewide-coloring/etc/config.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'SiteWideColoring\\App\\Hook\\AbstractHook' not found in wp-content/plugins/sitewide-coloring/hooks/SiteWiding.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'SiteWideColoring\\App\\Service\\AbstractService' not found in wp-content/plugins/sitewide-coloring/services/SiteWiding.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'SiteWideColoring\\App\\Registry\\RegistryAwareInterface' not found in wp-content/plugins/sitewide-coloring/app/Hook/AbstractHook.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'SiteWideColoring\\App\\Registry\\RegistryAwareInterface' not found in wp-content/plugins/sitewide-coloring/app/Hook/Manager.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'SiteWideColoring\\App\\Registry\\RegistryInterface' not found in wp-content/plugins/sitewide-coloring/app/Registry.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'SiteWideColoring\\App\\Registry\\RegistryAwareInterface' not found in wp-content/plugins/sitewide-coloring/app/Service/AbstractService.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'SiteWideColoring\\App\\Registry\\RegistryAwareInterface' not found in wp-content/plugins/sitewide-coloring/app/View/Renderer.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% 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
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Title Options Screen), #2 (Display Settings Options Screen), #3 (Example Options Screen)
You can take inspiration from this readme.txt

sitewide-coloring/sitewide-coloring.php Passed 13 tests

The main file in "Sitewide Coloring" v. 2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
50 characters long description:
Color your website with banners just in one click.

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 detected2,482 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP253396471,687
CSS1994608
JavaScript33123187

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity12.05
▷ Minimum class complexity1.00
▷ Maximum class complexity122.00
Average method complexity3.59
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces12
Interfaces2
Traits1
Classes17
▷ Abstract classes211.76%
▷ Concrete classes1588.24%
▷ Final classes320.00%
Methods92
▷ Static methods1617.39%
▷ Public methods7379.35%
▷ Protected methods1920.65%
▷ Private methods00.00%
Functions9
▷ Named functions00.00%
▷ Anonymous functions9100.00%
Constants10
▷ Global constants00.00%
▷ Class constants10100.00%
▷ Public constants10100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.11MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png11.58KB5.54KB▼ 52.12%
screenshot-3.png77.87KB36.00KB▼ 53.77%
assets/images/sitewide_delete_block_bg.png1.09KB0.24KB▼ 78.48%
screenshot-1.png17.92KB8.86KB▼ 50.56%
assets/images/sitewide_select_arrow.png1.04KB0.27KB▼ 74.51%