84% wpjaipho

Code Review | WPJaipho Mobile Gallery

WordPress plugin WPJaipho Mobile Gallery scored84%from 54 tests.

About plugin

  • Plugin page: wpjaipho
  • Plugin version: 1.5.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.2.2
  • WordPress version: 6.3.1
  • First release: Aug 21, 2012
  • Latest release: May 25, 2015
  • Number of updates: 84
  • Update frequency: every 15.1 days
  • Top authors: tole.car (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /11,974 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼4.67ms] Passed 4 tests

An overview of server-side resources used by WPJaipho Mobile Gallery
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2650.60 ▲7.49
Dashboard /wp-admin3.36 ▲0.0548.83 ▲2.79
Posts /wp-admin/edit.php3.47 ▲0.1144.90 ▼7.88
Add New Post /wp-admin/post-new.php5.94 ▲0.0585.55 ▼19.93
Media Library /wp-admin/upload.php3.28 ▲0.0541.17 ▲6.35
WPJaipho /wp-admin/options-general.php?page=wp-jaipho3.4242.31

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 62 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

WPJaipho Mobile Gallery: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4714.48 ▲0.111.84 ▼0.1348.86 ▼1.38
Dashboard /wp-admin2,210 ▲285.79 ▲0.9098.96 ▼2.0741.48 ▼1.55
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0134.15 ▼7.9831.34 ▼7.08
Add New Post /wp-admin/post-new.php1,540 ▲723.34 ▼0.17691.51 ▲63.6258.47 ▲6.91
Media Library /wp-admin/upload.php1,395 ▲74.13 ▼0.07108.68 ▲11.5649.64 ▲5.83
WPJaipho /wp-admin/options-general.php?page=wp-jaipho1,3212.0731.0329.64

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

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
Good news, no errors were detected

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
  • 47× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      require_once(Jph/Wp/Admin/Validator/IValidator.php): failed to open stream: No such file or directory in wp-content/plugins/wpjaipho/library/Jph/Wp/Admin/Validator/OptionListDefinition.php on line 3
    • > PHP Warning
      require_once(Jph/Wp/Admin/Validator/ValidatorResponse.php): failed to open stream: No such file or directory in wp-content/plugins/wpjaipho/library/Jph/Wp/Admin/Validator/IValidator.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'Jph/Wp/JaiphoPlugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/wpjaipho/gallery.php on line 3
    • > PHP Warning
      require_once(Jph/Wp/Admin/Editor/IEditor.php): failed to open stream: No such file or directory in wp-content/plugins/wpjaipho/library/Jph/Wp/Admin/Editor/Checkbox.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'Jph/Wp/Admin/Editor/IEditor.php' (include_path='.:/usr/share/php') in wp-content/plugins/wpjaipho/library/Jph/Wp/Admin/Editor/Input.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'Pipho/DeviceInfo.php' (include_path='.:/usr/share/php') in wp-content/plugins/wpjaipho/library/Jph/Wp/AbstractTemplateApi.php on line 3
    • > PHP Warning
      require_once(Jph/Wp/Admin/Adapter/DefaultAdapter.php): failed to open stream: No such file or directory in wp-content/plugins/wpjaipho/library/Jph/Wp/ConfigurationOption.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'Jph/Wp/Admin/Editor/IEditor.php' (include_path='.:/usr/share/php') in wp-content/plugins/wpjaipho/library/Jph/Wp/Admin/Editor/Checkbox.php on line 3
    • > PHP Warning
      require_once(Jph/Wp/Admin/Validator/IValidator.php): failed to open stream: No such file or directory in wp-content/plugins/wpjaipho/library/Jph/Wp/Admin/Validator/OptionIntPositiveDefinition.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'Pipho/DeviceInfo.php' (include_path='.:/usr/share/php') in wp-content/plugins/wpjaipho/library/Jph/Wp/MedialLibraryTemplate.php on line 3

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 issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Tags: Please delete some tags, you are using 16 tag instead of maximum 10
The official readme.txt is a good inspiration

wpjaipho/wpjaipho.php Passed 13 tests

The main PHP script in "WPJaipho Mobile Gallery" version 1.5.0 is automatically included on every request by WordPress
87 characters long description:
WPJaipho is a mobile image gallery plugin optimized for iPhone, iPad and Android users.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected4,635 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript16781082,127
PHP396293151,917
CSS29718591

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity5.23
▷ Minimum class complexity1.00
▷ Maximum class complexity41.00
Average method complexity2.16
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces4
Traits0
Classes31
▷ Abstract classes13.23%
▷ Concrete classes3096.77%
▷ Final classes00.00%
Methods145
▷ Static methods1711.72%
▷ Public methods11680.00%
▷ Protected methods1913.10%
▷ Private methods106.90%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants222.22%
▷ Class constants777.78%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
14 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
jaipho/Themes/Default/navPrev.png0.34KB0.35KB0.00%
jaipho/Themes/iUI/navPlay.png0.39KB0.45KB0.00%
jaipho/Themes/iUI/btnBack.png0.80KB0.91KB0.00%
jaipho/Themes/iUI/toolbar.png0.17KB0.26KB0.00%
jaipho/Themes/Default/navPlay.png0.39KB0.45KB0.00%