56% photography-management

Code Review | Photography Management - WordPress Photo Proofing Plugin

WordPress plugin Photography Management - WordPress Photo Proofing Plugin scored 56% from 54 tests.

About plugin

  • Plugin page: photography-manag...
  • Plugin version: 4.5.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.7
  • WordPress version: 5.9.2
  • First release: Dec 29, 2014
  • Latest release: May 1, 2021
  • Number of updates: 233
  • Update frequency: every 9.9 days
  • Top authors: denis_golovin (98.71%)alex_schwabauer (1.72%)

Code review

54 tests

User reviews

73 reviews

Install metrics

1,000+ active / 69,511 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲4.14MB] [CPU: ▼264.09ms] Passed 4 tests

Analyzing server-side resources used by Photography Management - WordPress Photo Proofing Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /7.79 ▲4.2878.60 ▲30.13
Dashboard /wp-admin7.57 ▲4.1759.74 ▲27.59
Posts /wp-admin/edit.php7.81 ▲4.1766.29 ▲28.72
Add New Post /wp-admin/post-new.php11.05 ▲4.08119.33 ▼1,136.15
Media Library /wp-admin/upload.php7.45 ▲4.1648.41 ▲23.47
Support /wp-admin/edit.php?post_type=client&page=phmm_support7.2643.48
Premium /wp-admin/edit.php?post_type=client&page=premium7.3543.26
Settings /wp-admin/edit.php?post_type=client&page=options7.6149.74
/wp-admin/index.php?page=cc-phmm-setup7.2740.23
Galleries /wp-admin/edit.php?post_type=client7.5050.65
New gallery /wp-admin/post-new.php?post_type=client7.6362.45

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 456 new files
Database: 1 new table, 11 new options
New tables
codeneric_phmm_comments
New WordPress options
codeneric/phmm/labels/all
codeneric/phmm/install_time
cc_phmm_default_thumbnail_id
cc_photo_manage_curr_version
cc_photo_manage_id
codeneric_phmm_plugin_settings
cc_photo_settings
codeneric_phmm_legacy__aware_of_modes
codeneric/phmm/admin_secret
codeneric_phmm_error_log
...

Browser metrics Passed 4 tests

An overview of browser requirements for Photography Management - WordPress Photo Proofing Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,856 ▲9816.28 ▲0.695.68 ▼1.432.24 ▼0.71
Dashboard /wp-admin2,982 ▲1246.15 ▼0.03119.17 ▼18.46155.09 ▼10.47
Posts /wp-admin/edit.php2,781 ▲933.25 ▲0.0170.46 ▲6.53144.95 ▲1.23
Add New Post /wp-admin/post-new.php1,701 ▼1821.35 ▼1.16418.89 ▼4.89148.45 ▼11.33
Media Library /wp-admin/upload.php1,817 ▲1225.71 ▲0.23154.13 ▼0.50180.82 ▼20.41
Support /wp-admin/edit.php?post_type=client&page=phmm_support1313.4759.5798.95
Premium /wp-admin/edit.php?post_type=client&page=premium1,1465.57122.51119.06
Settings /wp-admin/edit.php?post_type=client&page=options1,8569.29168.86149.74
/wp-admin/index.php?page=cc-phmm-setup1313.5160.2199.86
Galleries /wp-admin/edit.php?post_type=client1,4933.1763.82115.34
New gallery /wp-admin/post-new.php?post_type=client1,79211.00242.43144.26

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie tables detected upon uninstall: 1 table
    • codeneric_phmm_comments
  • Zombie WordPress options detected upon uninstall: 11 options
    • cc_photo_manage_id
    • codeneric_phmm_install_wizard_was_open
    • codeneric_phmm_plugin_settings
    • codeneric_phmm_error_log
    • codeneric/phmm/labels/all
    • codeneric/phmm/admin_secret
    • codeneric/phmm/install_time
    • codeneric_phmm_legacy__aware_of_modes
    • cc_phmm_default_thumbnail_id
    • cc_photo_manage_curr_version
    • ...

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 19 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=client
    • > User notice in wp-includes/functions.php+5768
    WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.)

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 8× PHP files output text when accessed directly:
    • > /wp-content/plugins/photography-management/vendor/analog/analog/examples/multi.php
    • > /wp-content/plugins/photography-management/vendor/analog/analog/examples/levelbuffer.php
    • > /wp-content/plugins/photography-management/vendor/analog/analog/examples/threshold.php
    • > /wp-content/plugins/photography-management/vendor/analog/analog/examples/file.php
    • > /wp-content/plugins/photography-management/vendor/analog/analog/examples/variable.php
    • > /wp-content/plugins/photography-management/vendor/analog/analog/examples/default.php
    • > /wp-content/plugins/photography-management/vendor/analog/analog/examples/psr-0.php
    • > /wp-content/plugins/photography-management/vendor/studio24/rotate/tests/src/bootstrap.php
  • 386× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined index: HACKLIB_ROOT in wp-content/plugins/photography-management/code/tests/tests/includes/LabelTest.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required '' (include_path='.:/usr/share/php') in wp-content/plugins/photography-management/code/includes/migrator.php on line 3
    • > PHP Fatal error
      Uncaught Error: Interface 'NinjaMutex\\Lock\\Fabric\\LockFabricWithExpirationInterface' not found in wp-content/plugins/photography-management/vendor/arvenil/ninja-mutex/tests/NinjaMutex/Lock/Fabric/MemcacheLockFabric.php:7
    • > PHP Notice
      Undefined index: HACKLIB_ROOT in wp-content/plugins/photography-management/code/tests/tests/admin/ajax/EndpointsTest.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'JsonSchema\\Exception\\RuntimeException' not found in wp-content/plugins/photography-management/vendor/justinrainbow/json-schema/src/JsonSchema/Exception/InvalidSchemaException.php:7
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/photography-management/lib/hacklib/containers/helper_traitsSEP..SEPcollections.ns.php' (include_path='.:/usr/share/php') in wp-content/plugins/photography-management/lib/hacklib/containers/helper_traits/hacklib_commonContainerMethods.php on line 13
    • > PHP Warning
      require_once(wp-content/plugins/photography-management/code/includes): failed to open stream: Success in /var/www/wordpress/wp-content/plugins/photography-management/code/includes/semaphore.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required '' (include_path='.:/usr/share/php') in wp-content/plugins/photography-management/code/shapesfn.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required '' (include_path='.:/usr/share/php') in wp-content/plugins/photography-management/code/includes/i18n.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required '' (include_path='.:/usr/share/php') in wp-content/plugins/photography-management/code/admin/update_functions.php on line 3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following user-side errors
    • > GET request to /wp-admin/edit.php?post_type=client&page=premium
    • > Network (severe)
    https://wpps.codeneric.com/paid?plugin_id=623e7affe050b259569354 - Failed to load resource: the server responded with a status of 402 ()

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: portrait photography, photo password protection, wedding photography, photo proofing

photography-management/photography_management.php 85% from 13 tests

The primary PHP file in "Photography Management - WordPress Photo Proofing Plugin" version 4.5.8 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("photography-management.php" instead of "photography_management.php")
  • Git Repository: Please remove the Git repository from this plugin

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
Good job! No executable or dangerous file extensions detected28,197 lines of code in 402 files:
LanguageFilesBlank linesComment linesLines of code
PHP2612,0865,10323,508
JSON656702,958
CSS9252482749
Markdown71850486
JavaScript4515656224
HTML1151108
YAML410070
XML47069
Bourne Shell49021
INI1003
SVG1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity7.71
▷ Minimum class complexity1.00
▷ Maximum class complexity155.00
Average method complexity2.19
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces44
Interfaces38
Traits20
Classes250
▷ Abstract classes72.80%
▷ Concrete classes24397.20%
▷ Final classes3715.23%
Methods1,715
▷ Static methods50129.21%
▷ Public methods1,44284.08%
▷ Protected methods1126.53%
▷ Private methods1619.39%
Functions223
▷ Named functions8437.67%
▷ Anonymous functions13962.33%
Constants132
▷ Global constants21.52%
▷ Class constants13098.48%
▷ Public constants130100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
8 compressed PNG files occupy 0.61MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
code/assets/js/9baccd8a016faed071c1cc62e5cc1681.png2.26KB2.26KB0.00%
code/assets/img/placeholder.png10.73KB5.63KB▼ 47.53%
code/assets/js/683ddcdb692098ac8be769297e872ede.png3.76KB3.75KB0.29%
code/assets/js/505b4ee15743a18eb37a46745c6c5802.png260.84KB263.33KB0.00%
code/assets/js/c30bc3c310d0a352194e119634548c1b.png243.92KB246.22KB0.00%