84% lh-browser-shots

Code Review | LH Browser Shots

WordPress plugin LH Browser Shots scored84%from 54 tests.

About plugin

  • Plugin page: lh-browser-shots
  • Plugin version: 2.00
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: May 12, 2016
  • Latest release: Aug 1, 2022
  • Number of updates: 9
  • Update frequency: every 252.6 days
  • Top authors: shawfactor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,669 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.58ms] Passed 4 tests

Analyzing server-side resources used by LH Browser Shots
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.43 ▼10.57
Dashboard /wp-admin3.33 ▲0.0343.71 ▼6.29
Posts /wp-admin/edit.php3.38 ▲0.0244.91 ▼2.29
Add New Post /wp-admin/post-new.php5.91 ▲0.0290.15 ▼3.18
Media Library /wp-admin/upload.php3.25 ▲0.0237.76 ▲3.06
Add browser shot /wp-admin/upload.php?page=lh-browser-shots/lh-browser-shots.php3.2330.45

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for LH Browser Shots
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.14 ▼1.141.74 ▲0.0047.85 ▲3.99
Dashboard /wp-admin2,213 ▲245.86 ▲0.95103.43 ▼16.5541.75 ▼3.29
Posts /wp-admin/edit.php2,093 ▲42.03 ▲0.0139.11 ▲3.4534.96 ▲0.12
Add New Post /wp-admin/post-new.php1,522 ▼1423.22 ▼0.06629.44 ▼55.9855.76 ▼4.59
Media Library /wp-admin/upload.php1,386 ▲44.17 ▼0.0694.32 ▼10.7242.99 ▲2.27
Add browser shot /wp-admin/upload.php?page=lh-browser-shots/lh-browser-shots.php8022.0523.8626.37

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 2× 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/lh-browser-shots/lh-browser-shots.php:224
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/lh-browser-shots/partials/upload.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (15 tag instead of maximum 10)
The official readme.txt might help

lh-browser-shots/lh-browser-shots.php 92% from 13 tests

The main PHP file in "LH Browser Shots" ver. 2.00 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Text Domain: Please use dashes and lowercase characters for text domains

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin358 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP434451358

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity26.00
▷ Minimum class complexity11.00
▷ Maximum class complexity41.00
Average method complexity3.08
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods24
▷ Static methods1979.17%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin