100% wpglobus-featured-images

Code Review | WPGlobus Featured Images

WordPress plugin WPGlobus Featured Images scored 100% from 54 tests.

About plugin

  • Plugin page: wpglobus-featured...
  • Plugin version: 2.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.8
  • WordPress version: 5.8.1
  • First release: Apr 15, 2015
  • Latest release: Jul 22, 2021
  • Number of updates: 46
  • Update frequency: every 49.8 days
  • Top authors: alexgff (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

700+ active / 12,638 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

Server-side resources used by WPGlobus Featured Images
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1235.38 ▲9.71
Dashboard /wp-admin3.06 ▲0.0137.16 ▼7.85
Posts /wp-admin/edit.php3.11 ▲0.0144.21 ▼2.92
Add New Post /wp-admin/post-new.php5.42 ▼0.0182.72 ▼583.66
Media Library /wp-admin/upload.php3.01 ▲0.0036.03 ▲2.81

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for WPGlobus Featured Images
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8315.87 ▲0.427.90 ▼0.3051.99 ▲5.18
Dashboard /wp-admin2,967 ▲335.89 ▼0.05143.63 ▼17.05123.58 ▲6.18
Posts /wp-admin/edit.php2,736 ▼32.69 ▲0.0163.25 ▼8.52101.14 ▲4.13
Add New Post /wp-admin/post-new.php1,683 ▲10218.79 ▼1.65371.02 ▼21.26115.43 ▼1.11
Media Library /wp-admin/upload.php1,810 ▲35.00 ▼0.01158.80 ▲1.62128.20 ▼1.67

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
The SRP test was a success

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)
Everything seems fine on the user side

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:
  • Tags: There are too many tags (12 tag instead of maximum 10)
You can look at the official readme.txt

wpglobus-featured-images/wpglobus-featured-images.php Passed 13 tests

"WPGlobus Featured Images" version 2.4.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
68 characters long description:
Set featured image separately for each language defined in WPGlobus.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin957 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP3258359704
JavaScript41528154
Markdown137099

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity108.00
▷ Minimum class complexity108.00
▷ Maximum class complexity108.00
Average method complexity5.28
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods25
▷ Static methods936.00%
▷ Public methods2392.00%
▷ Protected methods28.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
No PNG images were found in this plugin