84% wp-photonav

Code Review | WP-PhotoNav

WordPress plugin WP-PhotoNav scored84%from 54 tests.

About plugin

  • Plugin page: wp-photonav
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.0
  • WordPress version: 6.3.1
  • First release: Jul 22, 2009
  • Latest release: Sep 6, 2014
  • Number of updates: 117
  • Update frequency: every 16.7 days
  • Top authors: fmos (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

500+ active /17,259 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼7.93ms] Passed 4 tests

An overview of server-side resources used by WP-PhotoNav
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.0346.88 ▼0.32
Dashboard /wp-admin3.59 ▲0.0351.99 ▼6.17
Posts /wp-admin/edit.php3.71 ▲0.0349.50 ▲0.60
Add New Post /wp-admin/post-new.php6.18 ▲0.0385.42 ▼22.61
Media Library /wp-admin/upload.php3.52 ▲0.0339.61 ▼2.60

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for WP-PhotoNav
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,906 ▲12013.47 ▼0.9610.29 ▲8.1545.30 ▲4.00
Dashboard /wp-admin2,192 ▲155.54 ▼0.1292.39 ▼6.6042.10 ▼6.55
Posts /wp-admin/edit.php2,100 ▼32.02 ▲0.0136.24 ▼0.8133.07 ▼5.94
Add New Post /wp-admin/post-new.php1,545 ▼023.31 ▼0.16699.32 ▲4.3151.68 ▼2.05
Media Library /wp-admin/upload.php1,400 ▼04.25 ▲0.01111.36 ▲4.0750.53 ▲3.20

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-photonav/wp-photonav.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Donate link: Invalid URI found ("")
The official readme.txt might help

wp-photonav/wp-photonav.php Passed 13 tests

The entry point to "WP-PhotoNav" version 1.2.2 is a PHP file that has certain tags in its header comment area
64 characters long description:
Provides a scrolling field without scrollbars for huge pictures.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin678 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript43730407
PHP11415129
Markdown1290103
CSS15139

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity2.62
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
moveme.png4.74KB3.19KB▼ 32.75%