78% easy-photo-album

Code Review | Easy Photo Album

WordPress plugin Easy Photo Album scored78%from 54 tests.

About plugin

  • Plugin page: easy-photo-album
  • Plugin version: 1.3.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.5.3
  • WordPress version: 6.3.1
  • First release: Jun 23, 2013
  • Latest release: Nov 4, 2016
  • Number of updates: 120
  • Update frequency: every 10.3 days
  • Top authors: TV productions (96.67%)aubreypwd (4.17%)

Code review

54 tests

User reviews

15 reviews

Install metrics

1,000+ active /63,655 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▲2.23ms] Passed 4 tests

This is a short check of server-side resources used by Easy Photo Album
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1244.64 ▲0.51
Dashboard /wp-admin3.44 ▲0.1354.27 ▲0.55
Posts /wp-admin/edit.php3.55 ▲0.2055.41 ▲2.71
Add New Post /wp-admin/post-new.php6.02 ▲0.13102.88 ▲5.15
Media Library /wp-admin/upload.php3.35 ▲0.1241.08 ▲6.78
Photo Albums /wp-admin/edit.php?post_type=easy-photo-album3.4246.83
Shelves /wp-admin/edit-tags.php?taxonomy=shelf&post_type=easy-photo-album3.5044.36
Easy Photo Album /wp-admin/options-general.php?page=epa-settings3.2932.83
Add New /wp-admin/post-new.php?post_type=easy-photo-album3.4654.46

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Easy Photo Album
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,043 ▲29714.20 ▼0.1610.30 ▲8.3361.78 ▲13.07
Dashboard /wp-admin2,244 ▲565.83 ▲0.97101.80 ▼16.8540.45 ▼5.98
Posts /wp-admin/edit.php2,127 ▲382.05 ▲0.0440.22 ▲1.5839.69 ▲4.03
Add New Post /wp-admin/post-new.php1,560 ▲3223.41 ▲0.67597.52 ▼75.3750.18 ▼8.97
Media Library /wp-admin/upload.php1,423 ▲354.26 ▲0.0798.93 ▼7.2147.73 ▲5.37
Photo Albums /wp-admin/edit.php?post_type=easy-photo-album1,2823.4152.5230.34
Shelves /wp-admin/edit-tags.php?taxonomy=shelf&post_type=easy-photo-album1,3652.1426.4533.58
Easy Photo Album /wp-admin/options-general.php?page=epa-settings1,1412.1226.9339.37
Add New /wp-admin/post-new.php?post_type=easy-photo-album2,1713.8968.6241.55

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
The following items require your attention
  • 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 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=epa-settings
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=epa-settings
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHWPINC/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/easy-photo-album/easy-photo-album.php on line 144
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/easy-photo-album/EPA_List_Table.php on line 3
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/easy-photo-album/EPA_List_Table.php on line 3
    • > PHP Warning
      Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in wp-content/plugins/easy-photo-album/easy-photo-album.php on line 144
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/easy-photo-album/easy-photo-album.php on line 144
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/easy-photo-album/EPA_List_Table.php on line 3
    • > PHP Warning
      require_once(ABSPATHWPINC/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/easy-photo-album/easy-photo-album.php on line 144

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 on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: photos, responsive, album, images, lightbox

easy-photo-album/easy-photo-album.php 85% from 13 tests

This is the main PHP file of "Easy Photo Album" version 1.3.7, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Description: Keep the plugin description shorter than 140 characters (currently 208 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin4,425 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
PHP132779951,986
PO File24127001,095
JavaScript11108172938
CSS96410371
SVG20135

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity20.40
▷ Minimum class complexity3.00
▷ Maximum class complexity67.00
Average method complexity2.87
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods104
▷ Static methods32.88%
▷ Public methods8581.73%
▷ Protected methods32.88%
▷ Private methods1615.38%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
10 PNG files occupy 1.24MB with 0.54MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/img/epa-settings-1.3.png86.80KB41.27KB▼ 52.45%
css/img/epa-album-1.2.png932.76KB202.64KB▼ 78.27%
css/img/epa-24.png1.79KB1.48KB▼ 17.41%
css/img/next.png1.32KB1.58KB0.00%
js/tinymce/insert.png4.15KB1.33KB▼ 68.00%