84% photopress-sideways-gallery

Code Review | PhotoPress - Sideways Gallery

WordPress plugin PhotoPress - Sideways Gallery scored84%from 54 tests.

About plugin

  • Plugin page: photopress-sidewa...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.2.2
  • WordPress version: 6.3.1
  • First release: Jan 14, 2014
  • Latest release: Jun 22, 2015
  • Number of updates: 13
  • Update frequency: every 40.5 days
  • Top authors: padams (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,626 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

A check of server-side resources used by PhotoPress - Sideways Gallery
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.90 ▲1.05
Dashboard /wp-admin3.31 ▲0.0145.14 ▲0.09
Posts /wp-admin/edit.php3.36 ▲0.0048.81 ▲0.32
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.50 ▼17.83
Media Library /wp-admin/upload.php3.23 ▲0.0032.51 ▲1.66

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for PhotoPress - Sideways Gallery
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲6413.25 ▼1.551.72 ▼0.1644.12 ▲0.86
Dashboard /wp-admin2,219 ▲314.85 ▼0.04112.43 ▲2.1941.22 ▲2.11
Posts /wp-admin/edit.php2,102 ▲132.03 ▲0.0539.38 ▲3.5836.03 ▲0.54
Add New Post /wp-admin/post-new.php1,557 ▲2618.15 ▼5.27619.17 ▲26.8365.38 ▲16.37
Media Library /wp-admin/upload.php1,401 ▲134.20 ▲0.0094.90 ▼2.8341.43 ▼0.58

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/photopress-sideways-gallery/photopress-sideways-gallery.php:269

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: images, slider, photos, gallery, sideways...

photopress-sideways-gallery/photopress-sideways-gallery.php Passed 13 tests

This is the main PHP file of "PhotoPress - Sideways Gallery" version 1.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
77 characters long description:
Adds a sideways scrolling gallery presentation to the core gallery shortcode.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected4,220 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
CSS516773,514
SVG100399
JavaScript26350177
PHP16677130

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods5100.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected