74% presswell-art-direction

Code Review | Presswell Art Direction

WordPress plugin Presswell Art Direction scored74%from 54 tests.

About plugin

  • Plugin page: presswell-art-dir...
  • Plugin version: 1.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Apr 12, 2018
  • Latest release: Oct 30, 2023
  • Number of updates: 31
  • Update frequency: every 65.4 days
  • Top authors: presswell (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /2,441 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼6.22ms] Passed 4 tests

An overview of server-side resources used by Presswell Art Direction
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0638.41 ▼4.23
Dashboard /wp-admin3.39 ▲0.0554.59 ▼7.79
Posts /wp-admin/edit.php3.50 ▲0.1549.17 ▲1.96
Add New Post /wp-admin/post-new.php5.97 ▲0.0890.26 ▼10.29
Media Library /wp-admin/upload.php3.29 ▲0.0632.00 ▼2.55
Art Direction /wp-admin/options-general.php?page=presswell-art-direction-settings3.3635.23

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 11 new files
Database: 1 new table, 9 new options
New tables
wp_pwad_image_queue
New WordPress options
widget_theysaidso_widget
pwad_conflicts
pwad_settings
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
wp_pwad_image_queue_db_version
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Presswell Art Direction
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,946 ▲20014.51 ▲0.231.74 ▲0.0643.73 ▼1.72
Dashboard /wp-admin2,352 ▲1816.25 ▲0.57112.66 ▲14.6241.20 ▼4.68
Posts /wp-admin/edit.php2,277 ▲1773.42 ▲1.4052.46 ▲15.3231.26 ▼1.73
Add New Post /wp-admin/post-new.php1,545 ▲1723.24 ▲0.17612.73 ▼54.1136.40 ▼21.70
Media Library /wp-admin/upload.php1,420 ▲204.27 ▲0.0882.45 ▼14.8442.62 ▼2.41
Art Direction /wp-admin/options-general.php?page=presswell-art-direction-settings1,8583.9059.8638.24

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie tables were found after uninstall: 1 table
    • wp_pwad_image_queue
  • This plugin does not fully uninstall, leaving 9 options in the database
    • wp_pwad_image_queue_db_version
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • pwad_conflicts
    • pwad_settings

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
Please fix the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/presswell-art-direction/includes/admin/templates/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/presswell-art-direction/includes/admin/templates/fields/sizes.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Tags: There are too many tags (13 tag instead of maximum 10)
  • Screenshots: Please describe screenshot #4 in presswell-art-direction/assets to your readme.txt
The official readme.txt might help

presswell-art-direction/presswell-art-direction.php Passed 13 tests

The main PHP file in "Presswell Art Direction" ver. 1.1.5 adds more information about the plugin and also serves as the entry point for this plugin
70 characters long description:
Control how image thumbnail sizes are defined, cropped, and generated.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin1,549 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP65321011,546
JavaScript2002
CSS1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity53.25
▷ Minimum class complexity17.00
▷ Maximum class complexity122.00
Average method complexity3.61
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods80
▷ Static methods45.00%
▷ Public methods80100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.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