10% simple-photon-photos

Code Review | Simple Photon Photos

WordPress plugin Simple Photon Photos scored10%from 54 tests.

About plugin

  • Plugin page: simple-photon-photos
  • Plugin version: 0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.5
  • WordPress version: 6.3.1
  • First release: Dec 18, 2012
  • Latest release: Dec 18, 2012
  • Number of updates: 7
  • Update frequency: every 0.6 days
  • Top authors: scottsousa (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,676 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method SimplePhotonPhotosInit::spp_activation() should not be called statically

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

Server-side resources used by Simple Photon Photos
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.50 ▼5.16
Dashboard /wp-admin3.31 ▲0.0044.62 ▼8.24
Posts /wp-admin/edit.php3.36 ▲0.0045.61 ▼1.37
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.61 ▼0.86
Media Library /wp-admin/upload.php3.23 ▲0.0033.59 ▼0.00

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Simple Photon Photos: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▼0.131.67 ▼0.0444.06 ▲1.87
Dashboard /wp-admin2,189 ▲125.51 ▼0.1591.56 ▼2.6337.91 ▼12.10
Posts /wp-admin/edit.php2,103 ▲31.96 ▼0.0135.29 ▼6.9833.67 ▼2.50
Add New Post /wp-admin/post-new.php1,528 ▲223.20 ▼0.25663.43 ▲14.8853.21 ▼3.83
Media Library /wp-admin/upload.php1,403 ▲34.20 ▲0.0395.53 ▼8.3242.44 ▲0.59

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please fix the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/simple-photon-photos/SimplePhotonPhotos.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-photon-photos/includes/simple-photon-photos-init.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Donate link: Invalid url: ""
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
You can look at the official readme.txt

simple-photon-photos/SimplePhotonPhotos.php 85% from 13 tests

This is the main PHP file of "Simple Photon Photos" version 0.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 220 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("simple-photon-photos.php" instead of "SimplePhotonPhotos.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
There were no executable files found in this plugin1,044 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript34832540
PHP275127311
CSS24718193

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.95
Average class complexity41.00
▷ Minimum class complexity11.00
▷ Maximum class complexity71.00
Average method complexity9.00
▷ Minimum method complexity1.00
▷ Maximum method complexity60.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.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

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.10MB with 0.06MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/intro.png103.92KB37.49KB▼ 63.92%