79% bemoalbum

Code Review | BEMO Album

WordPress plugin BEMO Album scored79%from 54 tests.

About plugin

  • Plugin page: bemoalbum
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2.4
  • WordPress version: 6.3.1
  • First release: Aug 28, 2015
  • Latest release: Aug 28, 2015
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: bemoore (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,081 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼7.78ms] Passed 4 tests

A check of server-side resources used by BEMO Album
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1135.50 ▼4.33
Dashboard /wp-admin3.41 ▲0.0745.75 ▼13.89
Posts /wp-admin/edit.php3.53 ▲0.1748.84 ▲2.88
Add New Post /wp-admin/post-new.php6.00 ▲0.1187.53 ▼15.78
Media Library /wp-admin/upload.php3.34 ▲0.1136.05 ▲3.76
BEMOAlbum /wp-admin/options-general.php?page=bemoalbum_settings3.3131.97
Albums /wp-admin/edit-tags.php?taxonomy=album&post_type=attachment3.3637.17
Images To Albums /wp-admin/upload.php?page=images-to-bemoalbums3.4131.27

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 69 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for BEMO Album
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,060 ▲31413.87 ▼0.498.63 ▲6.8750.31 ▲6.27
Dashboard /wp-admin2,331 ▲1435.06 ▼0.84120.83 ▲6.3744.06 ▼1.89
Posts /wp-admin/edit.php2,216 ▲1242.50 ▲0.5039.02 ▲0.5537.34 ▲2.52
Add New Post /wp-admin/post-new.php1,633 ▲11923.08 ▲5.63665.34 ▼13.4939.44 ▼9.71
Media Library /wp-admin/upload.php1,510 ▲1224.47 ▲0.2996.65 ▼0.5542.90 ▼1.95
BEMOAlbum /wp-admin/options-general.php?page=bemoalbum_settings9141.9226.1724.56
Albums /wp-admin/edit-tags.php?taxonomy=album&post_type=attachment1,6353.3850.1428.81
Images To Albums /wp-admin/upload.php?page=images-to-bemoalbums1,0802.1027.6925.39

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% 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)
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bemoalbum/bemoalbum_form.php:22
    • > 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/bemoalbum/classes/class.Image_To_Album_Table.php on line 4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/bemoalbum/classes/class.Image_To_Album_Table.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/bemoalbum/categories-images.php: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/bemoalbum/classes/class.Image_To_Album_Table.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bemoalbum/image_to_album.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bemoalbum/bemoalbum_form.php:22

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/edit-tags.php?taxonomy=album&post_type=attachment
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/edit-tags.php?taxonomy=album&post_type=attachment:283:21)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/edit-tags.php?taxonomy=album&post_type=attachment
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function

Optimizations

Plugin configuration Passed 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
7 plugin tags: nested albums, wordpress photo album, photo album, photo catalog, album...

bemoalbum/bemoalbum.php Passed 13 tests

The entry point to "BEMO Album" version 1.0.0 is a PHP file that has certain tags in its header comment area
74 characters long description:
Shows a collection of albums that you can click into to reveal the images.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected2,720 lines of code in 58 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript432252961,332
PHP7254390842
Markdown12100406
CSS594371
JSON20069

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity8.33
▷ Minimum class complexity3.00
▷ Maximum class complexity19.00
Average method complexity2.05
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods2095.24%
▷ Protected methods14.76%
▷ Private methods00.00%
Functions33
▷ Named functions33100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
7 PNG files occupy 0.35MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/icon.png0.36KB0.18KB▼ 50.27%
colorbox/images/controls.png1.23KB1.28KB0.00%
images/icon.png0.36KB0.18KB▼ 50.27%
colorbox/images/border.png0.07KB0.10KB0.00%
colorbox/images/overlay.png0.11KB0.15KB0.00%