84% photopress-latest-images

Code Review | PhotoPress - Latest Images

WordPress plugin PhotoPress - Latest Images scored84%from 54 tests.

About plugin

  • Plugin page: photopress-latest...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.1-3.8.1
  • WordPress version: 6.3.1
  • First release: Jul 16, 2012
  • Latest release: Feb 24, 2014
  • Number of updates: 10
  • Update frequency: every 58.8 days
  • Top authors: padams (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,792 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

An overview of server-side resources used by PhotoPress - Latest Images
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0134.74 ▼5.45
Dashboard /wp-admin3.32 ▲0.0145.68 ▼5.66
Posts /wp-admin/edit.php3.37 ▲0.0145.05 ▼2.10
Add New Post /wp-admin/post-new.php5.90 ▲0.0189.83 ▼0.36
Media Library /wp-admin/upload.php3.24 ▲0.0134.97 ▼1.19

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for PhotoPress - Latest Images
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.371.74 ▲0.0939.75 ▼4.11
Dashboard /wp-admin2,198 ▲185.66 ▼0.0482.17 ▼18.0638.39 ▼6.23
Posts /wp-admin/edit.php2,097 ▼31.95 ▼0.0334.76 ▲1.6134.13 ▼4.48
Add New Post /wp-admin/post-new.php1,526 ▼023.18 ▼0.24597.65 ▼67.7048.82 ▼4.34
Media Library /wp-admin/upload.php1,400 ▼04.30 ▲0.0896.61 ▼3.6541.06 ▼5.39

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/photopress-latest-images/photopress-latest-images.php:134

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, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: photopress, images, photography, latest images, attachments...

photopress-latest-images/photopress-latest-images.php Passed 13 tests

The primary PHP file in "PhotoPress - Latest Images" version 1.1 is used by WordPress to initiate all plugin functionality
64 characters long description:
Adds a shortcode that will display the latest image attachments.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin84 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1351784

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected