84% epnb-featured-image-widget

Code Review | Epnb Featured Image Widget

WordPress plugin Epnb Featured Image Widget scored 84% from 54 tests.

About plugin

  • Plugin page: epnb-featured-ima...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.6.1
  • WordPress version: 6.3.1
  • First release: Sep 28, 2016
  • Latest release: Sep 22, 2016
  • Number of updates: 3
  • Update frequency: every 1.0 days
  • Top authors: epnb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 1,246 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.85ms] Passed 4 tests

A check of server-side resources used by Epnb Featured Image Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.15 ▼8.49
Dashboard /wp-admin3.32 ▲0.0150.53 ▲0.43
Posts /wp-admin/edit.php3.37 ▲0.0146.32 ▼0.86
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.37 ▲4.83
Media Library /wp-admin/upload.php3.24 ▲0.0133.94 ▼2.48

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_epnb_featured_image_widget
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Epnb Featured Image Widget: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.37 ▼0.634.17 ▲2.3838.55 ▼6.44
Dashboard /wp-admin2,203 ▲155.92 ▲0.04108.39 ▲1.7038.98 ▼6.11
Posts /wp-admin/edit.php2,089 ▼02.06 ▲0.0240.64 ▲4.9835.85 ▼0.41
Add New Post /wp-admin/post-new.php1,519 ▼1523.15 ▼0.25594.62 ▼14.8952.10 ▲3.48
Media Library /wp-admin/upload.php1,382 ▼94.18 ▼0.0395.22 ▼4.5143.25 ▲2.39

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_epnb_featured_image_widget
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/epnb-featured-image-widget/epnb-featured-image-widget.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: thumbnail, picture, featured, photo, image...

epnb-featured-image-widget/epnb-featured-image-widget.php Passed 13 tests

The main file in "Epnb Featured Image Widget" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
38 characters long description:
Widget pour afficher l'image à la une

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected106 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1101378
PO File16628

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin