84% last-9-photos-webcomponent

Code Review | Last 9 Photos - WebComponent

WordPress plugin Last 9 Photos - WebComponent scored84%from 54 tests.

About plugin

  • Plugin page: last-9-photos-web...
  • Plugin version: 2.9.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.6
  • WordPress version: 6.3.1
  • First release: May 19, 2020
  • Latest release: Mar 4, 2021
  • Number of updates: 26
  • Update frequency: every 11.1 days
  • Top authors: ptkdev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /708 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Last 9 Photos - WebComponent
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.97 ▼1.97
Dashboard /wp-admin3.31 ▲0.0054.93 ▲2.63
Posts /wp-admin/edit.php3.36 ▲0.0048.30 ▼5.16
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.98 ▼20.43
Media Library /wp-admin/upload.php3.23 ▲0.0038.74 ▲2.09

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Last 9 Photos - WebComponent
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.35 ▲0.241.83 ▲0.1340.34 ▼3.07
Dashboard /wp-admin2,198 ▲185.65 ▲0.0691.94 ▲0.9736.81 ▼7.33
Posts /wp-admin/edit.php2,100 ▼32.01 ▲0.0533.19 ▼8.4335.89 ▼0.64
Add New Post /wp-admin/post-new.php1,531 ▼423.08 ▼0.08663.90 ▼38.8252.43 ▼2.42
Media Library /wp-admin/upload.php1,397 ▼34.16 ▼0.04107.63 ▲2.5446.47 ▲2.87

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however 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
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/last-9-photos-webcomponent/last_9_photos_webcomponent.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed: The official readme.txt might help

last-9-photos-webcomponent/last_9_photos_webcomponent.php 92% from 13 tests

The main file in "Last 9 Photos - WebComponent" v. 2.9.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("last-9-photos-webcomponent.php" instead of "last_9_photos_webcomponent.php")

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
Everything looks great! No dangerous files found in this plugin824 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript696120804
PHP121020

PHP code Passed 2 tests

Analyzing 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.30
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
PNG images were not found in this plugin