77% cb-parallax

Code Review | cbParallax

WordPress plugin cbParallax scored77%from 54 tests.

About plugin

  • Plugin page: cb-parallax
  • Plugin version: 0.9.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.1.1
  • WordPress version: 6.3.1
  • First release: Jul 28, 2015
  • Latest release: Mar 17, 2023
  • Number of updates: 379
  • Update frequency: every 7.5 days
  • Top authors: OneMoreNerd (69.66%)demispatti (30.61%)

Code review

54 tests

User reviews

6 reviews

Install metrics

300+ active /22,815 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.55MB] [CPU: ▼3.51ms] Passed 4 tests

An overview of server-side resources used by cbParallax
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.00 ▲0.5445.67 ▲4.26
Dashboard /wp-admin3.85 ▲0.5554.18 ▲5.38
Posts /wp-admin/edit.php3.90 ▲0.5549.09 ▼0.62
Add New Post /wp-admin/post-new.php6.47 ▲0.5887.62 ▼21.35
Media Library /wp-admin/upload.php3.78 ▲0.5537.92 ▲3.66

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 124 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

Checking browser requirements for cbParallax
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,945 ▲18414.36 ▼0.171.79 ▲0.0744.14 ▲6.58
Dashboard /wp-admin2,339 ▲1625.60 ▼0.0280.99 ▼5.0676.90 ▲35.16
Posts /wp-admin/edit.php2,259 ▲1621.98 ▼0.0234.87 ▼0.4532.42 ▼1.09
Add New Post /wp-admin/post-new.php7,205 ▲5,67926.58 ▲3.65937.52 ▲259.7845.86 ▼6.76
Media Library /wp-admin/upload.php1,550 ▲1534.23 ▼0.0196.56 ▼4.8778.75 ▲33.67
cbParallax /wp-admin/cb-parallax.php260.420.0914.43

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      require_once(): Failed opening required 'CBPARALLAX_ROOT_DIRadmin/partials/class-settings-display.php' (include_path='.:/usr/share/php') in wp-content/plugins/cb-parallax/admin/includes/class-meta-box.php on line 9
    • > PHP Warning
      Use of undefined constant CBPARALLAX_ROOT_DIR - assumed 'CBPARALLAX_ROOT_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/cb-parallax/admin/includes/class-meta-box.php on line 9
    • > PHP Warning
      require_once(CBPARALLAX_ROOT_DIRadmin/partials/class-settings-display.php): failed to open stream: No such file or directory in wp-content/plugins/cb-parallax/admin/includes/class-meta-box.php on line 9

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/cb-parallax.php
    • > Network (severe)
    wp-admin/cb-parallax.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Requires php: Version not formatted correctly
  • Contributors: Plugin contributors field is missing
You can look at the official readme.txt

cb-parallax/cb-parallax.php 92% from 13 tests

The main file in "cbParallax" v. 0.9.7 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 483 characters long)

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 detected8,212 lines of code in 59 files:
LanguageFilesBlank linesComment linesLines of code
CSS139391023,565
PHP227071,7132,186
JavaScript91881831,374
Markdown61620654
PO File1189397300
XML700132
SVG1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity12.10
▷ Minimum class complexity1.00
▷ Maximum class complexity76.00
Average method complexity2.69
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces9
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods131
▷ Static methods75.34%
▷ Public methods9270.23%
▷ Protected methods00.00%
▷ Private methods3929.77%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
44 PNG files occupy 0.61MB with 0.25MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/jquery-ui/themes/images/ui-bg_glass_55_fbf9ee_1x400.png0.38KB0.12KB▼ 67.68%
public/images/overlays/01.png0.21KB0.10KB▼ 52.61%
vendor/jquery-ui/themes/images/ui-icons_888888_256x240.png6.94KB4.18KB▼ 39.78%
admin/images/contextual-help/tab-2/horizontal-to-the-right-de.png9.80KB5.15KB▼ 47.48%
public/images/overlays/pixel-weave.png0.24KB0.26KB0.00%