68% photoldr

Code Review | PhotoLDR

WordPress plugin PhotoLDR scored 68% from 54 tests.

About plugin

  • Plugin page: photoldr
  • Plugin version: 1.12
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Feb 5, 2013
  • Latest release: Feb 5, 2013
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: willisiw (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 741 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.96MB] [CPU: ▼53.87ms] Passed 4 tests

An overview of server-side resources used by PhotoLDR
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.82 ▼47.09
Dashboard /wp-admin2.05 ▼1.266.96 ▼37.67
Posts /wp-admin/edit.php2.05 ▼1.316.38 ▼41.32
Add New Post /wp-admin/post-new.php2.05 ▼3.846.06 ▼89.39
Media Library /wp-admin/upload.php2.05 ▼1.185.43 ▼30.88
PhotoLDR /wp-admin/options-general.php?page=photoldr2.055.93

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for PhotoLDR
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲6414.48 ▲0.091.52 ▼0.1739.66 ▼1.48
Dashboard /wp-admin2,215 ▲275.85 ▲0.85106.64 ▼2.5341.21 ▼2.84
Posts /wp-admin/edit.php2,098 ▲92.04 ▲0.0339.13 ▼3.0636.10 ▼1.96
Add New Post /wp-admin/post-new.php1,533 ▲1323.22 ▼0.11607.45 ▼61.9351.44 ▼7.46
Media Library /wp-admin/upload.php1,394 ▲64.20 ▲0.0695.91 ▼18.7840.87 ▼6.75
PhotoLDR /wp-admin/options-general.php?page=photoldr17,3992.0331.4447.78

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the photoldr-css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=photoldr
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the photoldr-css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=photoldr
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the photoldr-css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

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
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/photoldr/photoldr.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Requires at least: Invalid plugin version format
  • Donate link: Please fix this invalid URI: ""
The official readme.txt might help

photoldr/photoldr.php Passed 13 tests

The principal PHP file in "PhotoLDR" v. 1.12 is loaded by WordPress automatically on each request
92 characters long description:
PhotoLDR makes it possible to easily add photos and content to Wordpress from an iOS device.

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 plugin885 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1212120842
CSS13043

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions11
▷ Named functions11100.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
There are no PNG files in this plugin