10% photostream-sync

Code Review | Photostream-sync

WordPress plugin Photostream-sync scored10%from 54 tests.

About plugin

  • Plugin page: photostream-sync
  • Plugin version: 2.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-3.8
  • WordPress version: 6.3.1
  • First release: Jan 27, 2013
  • Latest release: May 1, 2014
  • Number of updates: 77
  • Update frequency: every 6.0 days
  • Top authors: enej (57.14%)apokalyptik (44.16%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /6,616 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/photostream-sync/photostream-sync.php+1756
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▼1.40MB] [CPU: ▼50.73ms] Passed 4 tests

Server-side resources used by Photostream-sync
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.58 ▼0.886.32 ▼32.56
Dashboard /wp-admin2.60 ▼0.708.32 ▼38.51
Posts /wp-admin/edit.php2.60 ▼0.756.98 ▼46.90
Add New Post /wp-admin/post-new.php2.60 ▼3.288.94 ▼84.94
Media Library /wp-admin/upload.php2.60 ▼0.636.59 ▼26.47
Photostreams /wp-admin/upload.php?page=photostream2.606.57

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Photostream-sync: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.23 ▼1.061.84 ▲0.2046.00 ▲4.68
Dashboard /wp-admin2,210 ▲225.79 ▲0.92108.25 ▼7.6442.55 ▲0.70
Posts /wp-admin/edit.php2,093 ▲11.99 ▼0.0333.53 ▼11.3034.88 ▼1.68
Add New Post /wp-admin/post-new.php1,545 ▲1218.35 ▼4.78597.41 ▼17.4259.73 ▼1.61
Media Library /wp-admin/upload.php1,392 ▲74.17 ▼0.0294.66 ▼24.9642.85 ▼4.26
Photostreams /wp-admin/upload.php?page=photostream8352.0629.9132.61

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/photostream-sync/photostream-sync.php+1756
    Array and string offset access syntax with curly braces is deprecated
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/upload.php?page=photostream
    • > Deprecated in wp-content/plugins/photostream-sync/class-photostream-client.php+86
    Array and string offset access syntax with curly braces is deprecated

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
  • 6× PHP files trigger server errors when accessed directly:
    • > 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/photostream-sync/class-photostream-list-table.php on line 6
    • > 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/photostream-sync/class-photostream-list-table.php on line 6
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/photostream-sync/class-photostream-list-table.php on line 6
    • > 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/photostream-sync/class-photostream-list-table.php on line 6
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/photostream-sync/class-photostream-list-table.php on line 6
    • > 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/photostream-sync/class-photostream-list-table.php on line 6

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)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 17 tag instead of maximum 10
You can take inspiration from this readme.txt

photostream-sync/photostream-sync.php Passed 13 tests

The main PHP file in "Photostream-sync" ver. 2.1.2 adds more information about the plugin and also serves as the entry point for this plugin
137 characters long description:
Synchronize your public iCloud photostreams to your WordPress installation. Import images, Import videos, create gallery posts, and more.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected1,767 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP33453811,488
CSS1183209
JavaScript4202170

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity74.00
▷ Minimum class complexity2.00
▷ Maximum class complexity182.00
Average method complexity3.92
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods75
▷ Static methods00.00%
▷ Public methods6789.33%
▷ Protected methods00.00%
▷ Private methods810.67%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There are no PNG files in this plugin