78% adamrob-parallax-scroll

Code Review | Parallax Scroll by adamrob.co.uk

WordPress plugin Parallax Scroll by adamrob.co.uk scored 78% from 54 tests.

About plugin

  • Plugin page: adamrob-parallax-...
  • Plugin version: 3.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.1.0
  • WordPress version: 5.8.1
  • First release: Oct 13, 2014
  • Latest release: Mar 9, 2019
  • Number of updates: 60
  • Update frequency: every 26.8 days
  • Top authors: adamrob (100%)

Code review

54 tests

User reviews

21 reviews

Install metrics

4,000+ active / 153,626 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.27MB] [CPU: ▼178.86ms] Passed 4 tests

Server-side resources used by Parallax Scroll by adamrob.co.uk
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.96 ▲0.1231.64 ▲7.22
Dashboard /wp-admin3.41 ▲0.3442.00 ▼4.13
Posts /wp-admin/edit.php3.46 ▲0.3546.57 ▲9.39
Add New Post /wp-admin/post-new.php5.71 ▲0.2776.78 ▼720.44
Media Library /wp-admin/upload.php3.35 ▲0.3429.80 ▲1.93
Add New /wp-admin/post-new.php?post_type=parallax_scroll3.4844.77
Parallax Scroll /wp-admin/edit.php?post_type=parallax_scroll3.4136.11

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 50 new files
Database: no new tables, 1 new option
New WordPress options
adamrob-parallax-scroll-op-version

Browser metrics Passed 4 tests

A check of browser resources used by Parallax Scroll by adamrob.co.uk
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,716 ▲6515.55 ▼0.179.12 ▲2.4076.28 ▼0.03
Dashboard /wp-admin2,965 ▲726.14 ▲0.03116.33 ▼14.96166.28 ▼8.25
Posts /wp-admin/edit.php2,775 ▲353.23 ▼0.0163.90 ▼0.28135.27 ▼2.68
Add New Post /wp-admin/post-new.php3,830 ▲7518.90 ▲0.93439.64 ▼5.20160.09 ▼1.28
Media Library /wp-admin/upload.php1,786 ▲345.48 ▼0.05143.29 ▲0.60185.53 ▼1.12
Add New /wp-admin/post-new.php?post_type=parallax_scroll3,7559.97194.21223.65
Parallax Scroll /wp-admin/edit.php?post_type=parallax_scroll2,0693.0860.35109.37

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 1 option
    • adamrob-parallax-scroll-op-version

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
The following issues need your attention
  • 7× PHP files output text when accessed directly:
    • > /wp-content/plugins/adamrob-parallax-scroll/admin/partials/help/adamrob-parallax-scroll-help-posttype-title.php
    • > /wp-content/plugins/adamrob-parallax-scroll/admin/partials/help/adamrob-parallax-scroll-help-posttype-style.php
    • > /wp-content/plugins/adamrob-parallax-scroll/admin/partials/help/adamrob-parallax-scroll-help-posttype-options.php
    • > /wp-content/plugins/adamrob-parallax-scroll/public/partials/adamrob-parallax-scroll-public-parallax-js-legacy.php
    • > /wp-content/plugins/adamrob-parallax-scroll/admin/partials/help/adamrob-parallax-scroll-help-posttype-new.php
    • > /wp-content/plugins/adamrob-parallax-scroll/admin/partials/help/adamrob-parallax-scroll-help-posttype-create.php
    • > /wp-content/plugins/adamrob-parallax-scroll/admin/partials/help/adamrob-parallax-scroll-help-posttype-fullwidth.php
  • 43× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: parameters in wp-content/plugins/adamrob-parallax-scroll/public/partials/adamrob-parallax-scroll-public-parallax-js-legacy.php on line 83
    • > PHP Notice
      Undefined variable: postid in wp-content/plugins/adamrob-parallax-scroll/public/partials/adamrob-parallax-scroll-public-parallax-js-legacy.php on line 51
    • > PHP Notice
      Undefined variable: parameters in wp-content/plugins/adamrob-parallax-scroll/public/partials/adamrob-parallax-scroll-public-parallax-js-legacy.php on line 45
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/adamrob-parallax-scroll/public/partials/adamrob-parallax-scroll-public-parallax-js-legacy.php on line 45
    • > PHP Notice
      Undefined variable: parameters in wp-content/plugins/adamrob-parallax-scroll/public/partials/adamrob-parallax-scroll-public-parallax-js-legacy.php on line 50
    • > PHP Notice
      Undefined variable: parameters in wp-content/plugins/adamrob-parallax-scroll/public/partials/adamrob-parallax-scroll-public-parallax-js-legacy.php on line 52
    • > PHP Fatal error
      Uncaught Error: Class 'Adamrob_Parallax_Scroll_Admin_Base' not found in wp-content/plugins/adamrob-parallax-scroll/admin/class-adamrob-parallax-scroll-post-type.php:22
    • > PHP Notice
      Undefined variable: parameters in wp-content/plugins/adamrob-parallax-scroll/public/partials/adamrob-parallax-scroll-public-parallax-js-legacy.php on line 19
    • > PHP Notice
      Undefined variable: parallaxFWStyleClass in wp-content/plugins/adamrob-parallax-scroll/public/partials/adamrob-parallax-scroll-public-parallax-js-legacy.php on line 26
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/adamrob-parallax-scroll/public/partials/adamrob-parallax-scroll-public-parallax-js-legacy.php on line 29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Plugin Name: Please specify the plugin name on the first line ( === adamrob-parallax-scroll === )
Please take inspiration from this readme.txt

adamrob-parallax-scroll/adamrob-parallax-scroll.php 92% from 13 tests

The main PHP script in "Parallax Scroll by adamrob.co.uk" version 3.0.1 is automatically included on every request by WordPress
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 163 characters long)

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
No dangerous file extensions were detected2,319 lines of code in 43 files:
LanguageFilesBlank linesComment linesLines of code
PHP337001,9951,670
JavaScript611391376
Markdown1400170
CSS32337103

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity7.06
▷ Minimum class complexity1.00
▷ Maximum class complexity38.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes18
▷ Abstract classes211.11%
▷ Concrete classes1688.89%
▷ Final classes00.00%
Methods109
▷ Static methods21.83%
▷ Public methods5550.46%
▷ Protected methods1513.76%
▷ Private methods3935.78%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin