84% picture-element-thumbnails

Code Review | Picture Element Thumbnails

WordPress plugin Picture Element Thumbnails scored84%from 54 tests.

About plugin

  • Plugin page: picture-element-t...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4.2
  • WordPress version: 6.3.1
  • First release: Jun 16, 2015
  • Latest release: Oct 4, 2016
  • Number of updates: 10
  • Update frequency: every 47.7 days
  • Top authors: eclev91 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,294 total downloads

Benchmarks

Plugin footprint 83% 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.18ms] Passed 4 tests

Server-side resources used by Picture Element Thumbnails
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0044.21 ▲1.03
Dashboard /wp-admin3.31 ▲0.0052.96 ▲1.77
Posts /wp-admin/edit.php3.36 ▲0.0043.97 ▼3.59
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.68 ▼14.62
Media Library /wp-admin/upload.php3.23 ▲0.0034.99 ▼3.55

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Picture Element Thumbnails
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▲0.081.74 ▼0.3344.10 ▲2.26
Dashboard /wp-admin2,195 ▲155.59 ▼0.0389.75 ▼7.0342.67 ▼0.88
Posts /wp-admin/edit.php2,100 ▼41.95 ▼0.0533.84 ▼5.5836.23 ▲1.67
Add New Post /wp-admin/post-new.php1,538 ▲1023.37 ▲0.39680.47 ▲8.4561.22 ▲0.77
Media Library /wp-admin/upload.php1,403 ▼04.15 ▼0.0998.93 ▼16.0646.07 ▼0.75

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/picture-element-thumbnails/picture-element-thumbnails.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
1 plugin tags: thumbnails

picture-element-thumbnails/picture-element-thumbnails.php Passed 13 tests

The primary PHP file in "Picture Element Thumbnails" version 1.0.4 is used by WordPress to initiate all plugin functionality
59 characters long description:
Add functions for using the element for WP featured images

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
Good job! No executable or dangerous file extensions detected162 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP1135685
Markdown138059
JSON10017
JavaScript1031

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods466.67%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected