82% ssp-director-tools

Code Review | SSP Director Tools

WordPress plugin SSP Director Tools scored 82% from 54 tests.

About plugin

  • Plugin page: ssp-director-tools
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.3
  • WordPress version: 5.8.1
  • First release: Jul 13, 2011
  • Latest release: Aug 22, 2015
  • Number of updates: 46
  • Update frequency: every 32.7 days
  • Top authors: parelius (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active / 5,098 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼143.05ms] Passed 4 tests

A check of server-side resources used by SSP Director Tools
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.76 ▲0.0529.55 ▲0.47
Dashboard /wp-admin3.08 ▲0.0342.70 ▲0.53
Posts /wp-admin/edit.php3.19 ▲0.0942.32 ▼1.18
Add New Post /wp-admin/post-new.php5.44 ▲0.0186.29 ▼572.02
Media Library /wp-admin/upload.php3.03 ▲0.0231.96 ▲4.45
SSP Director Tools /wp-admin/options-general.php?page=ssp-director-tools2.9722.85

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 84 new files
Database: no new tables, 4 new options
New WordPress options
sspdt_format_options
sspdt_defaults
widget_sspdt_widget
sspdt_fancybox

Browser metrics Passed 4 tests

SSP Director Tools: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,869 ▲27316.34 ▲0.7718.17 ▲9.1743.52 ▼5.02
Dashboard /wp-admin2,975 ▲445.91 ▼0.06149.78 ▼9.79113.05 ▲0.72
Posts /wp-admin/edit.php2,744 ▲52.69 ▲0.0066.00 ▼1.3686.02 ▼5.97
Add New Post /wp-admin/post-new.php1,675 ▲7118.85 ▲0.04379.06 ▲11.60113.27 ▲6.48
Media Library /wp-admin/upload.php1,812 ▲55.03 ▼0.01141.74 ▼4.48116.17 ▼4.14
SSP Director Tools /wp-admin/options-general.php?page=ssp-director-tools2,4172.0953.80103.62

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=ssp-director-tools
    • > Warning in wp-content/plugins/ssp-director-tools/includes/sspdt-options-page.php+162
    Use of undefined constant curl_version - assumed 'curl_version' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=ssp-director-tools
    • > User deprecated in wp-includes/functions.php+5221
    screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=ssp-director-tools
    • > User deprecated in wp-includes/functions.php+5221
    get_screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=ssp-director-tools
    • > Notice in wp-content/plugins/ssp-director-tools/includes/sspdt-options-page.php+270
    Undefined variable: disable_cache
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=ssp-director-tools
    • > Notice in wp-content/plugins/ssp-director-tools/includes/sspdt-options-page.php+299
    Trying to access array offset on value of type bool

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/ssp-director-tools/feed/feed.php
  • 24× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'DirectorWrapper' not found in wp-content/plugins/ssp-director-tools/feed/includes/api/Gallery.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'DirectorWrapper' not found in wp-content/plugins/ssp-director-tools/includes/api/Gallery.php:3
    • > PHP Notice
      Undefined index: name in wp-content/plugins/ssp-director-tools/includes/api/cache/clear.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'DirectorWrapper' not found in wp-content/plugins/ssp-director-tools/feed/includes/api/Format.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'DirectorWrapper' not found in wp-content/plugins/ssp-director-tools/feed/includes/api/Utils.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'DirectorWrapper' not found in wp-content/plugins/ssp-director-tools/includes/api/Format.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'DirectorWrapper' not found in wp-content/plugins/ssp-director-tools/includes/api/App.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'DirectorWrapper' not found in wp-content/plugins/ssp-director-tools/includes/api/Cache.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'DirectorWrapper' not found in wp-content/plugins/ssp-director-tools/includes/api/Utils.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'DirectorWrapper' not found in wp-content/plugins/ssp-director-tools/includes/api/Album.php:3

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 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
  • Screenshots: Add images for these screenshots: #1 (Options pane), #2 (Photo Grid Widget), #3 (Example output of a photo grid with RSS photo link)
Please take inspiration from this readme.txt

ssp-director-tools/ssp-director-tools.php 92% from 13 tests

Analyzing the main PHP file in "SSP Director Tools" version 1.3
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin3,849 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP223981682,047
JavaScript5297119887
PO File2284412510
CSS36718394
XML10011

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity7.69
▷ Minimum class complexity1.00
▷ Maximum class complexity37.00
Average method complexity2.98
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes26
▷ Abstract classes00.00%
▷ Concrete classes26100.00%
▷ Final classes00.00%
Methods88
▷ Static methods00.00%
▷ Public methods7989.77%
▷ Protected methods22.27%
▷ Private methods77.95%
Functions31
▷ Named functions31100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
28 compressed PNG files occupy 0.35MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png178.81KB68.44KB▼ 61.72%
js/fancybox/fancy_nav_right.png1.42KB1.66KB0.00%
js/fancybox/fancy_close.png1.48KB1.73KB0.00%
js/fancybox/fancy_nav_left.png1.41KB1.64KB0.00%
js/fancybox/fancy_shadow_se.png0.34KB0.48KB0.00%