84% wp-scroll-up

Code Review | wp-scroll-up

WordPress plugin wp-scroll-up scored84%from 54 tests.

About plugin

  • Plugin page: wp-scroll-up
  • Plugin version: 0.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-3.9
  • WordPress version: 6.3.1
  • First release: May 2, 2014
  • Latest release: Aug 7, 2014
  • Number of updates: 28
  • Update frequency: every 3.5 days
  • Top authors: dsawardekar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,556 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.51MB] [CPU: ▲2.87ms] Passed 4 tests

An overview of server-side resources used by wp-scroll-up
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.97 ▲0.5050.93 ▲8.64
Dashboard /wp-admin3.82 ▲0.5154.22 ▲4.66
Posts /wp-admin/edit.php3.87 ▲0.5156.34 ▲6.18
Add New Post /wp-admin/post-new.php6.40 ▲0.5191.93 ▼5.25
Media Library /wp-admin/upload.php3.74 ▲0.5143.58 ▲5.90
WP Scroll Up /wp-admin/options-general.php?page=wp-scroll-up3.6537.47

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for wp-scroll-up
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲14713.80 ▼0.6111.03 ▲9.2842.32 ▼6.60
Dashboard /wp-admin2,202 ▲255.61 ▼0.0592.67 ▲0.9542.30 ▼1.77
Posts /wp-admin/edit.php2,104 ▲41.97 ▼0.0339.13 ▲2.3436.29 ▲5.30
Add New Post /wp-admin/post-new.php1,529 ▲123.13 ▼0.09678.58 ▼5.2359.19 ▲8.80
Media Library /wp-admin/upload.php1,398 ▲14.08 ▼0.12100.54 ▼8.2843.56 ▼4.04
WP Scroll Up /wp-admin/options-general.php?page=wp-scroll-up9163.1754.1526.81

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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
  • 141× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Encase\\ContainerItem' not found in wp-content/plugins/wp-scroll-up/vendor/dsawardekar/encase-php/src/Encase/SingletonItem.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression_Unary' not found in wp-content/plugins/wp-scroll-up/vendor/twig/twig/lib/Twig/Node/Expression/Unary/Neg.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression' not found in wp-content/plugins/wp-scroll-up/vendor/twig/twig/lib/Twig/Node/Expression/TempName.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Extension' not found in wp-content/plugins/wp-scroll-up/vendor/twig/twig/lib/Twig/Extension/Escaper.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression' not found in wp-content/plugins/wp-scroll-up/vendor/twig/twig/lib/Twig/Node/Expression/Constant.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression_Binary' not found in wp-content/plugins/wp-scroll-up/vendor/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseOr.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression_Binary' not found in wp-content/plugins/wp-scroll-up/vendor/twig/twig/lib/Twig/Node/Expression/Binary/And.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression_Binary' not found in wp-content/plugins/wp-scroll-up/vendor/twig/twig/lib/Twig/Node/Expression/Binary/GreaterEqual.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_TokenParser' not found in wp-content/plugins/wp-scroll-up/vendor/twig/twig/lib/Twig/TokenParser/AutoEscape.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Filter' not found in wp-content/plugins/wp-scroll-up/vendor/twig/twig/lib/Twig/Filter/Method.php:20

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)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots do not have images: #1 (Screenshot 1), #2 (Screenshot 2)
The official readme.txt might help

wp-scroll-up/wp-scroll-up.php Passed 13 tests

The primary PHP file in "wp-scroll-up" version 0.5.1 is used by WordPress to initiate all plugin functionality
54 characters long description:
WordPress Integration with the scrollUp jQuery Plugin.

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
Success! There were no dangerous files found in this plugin23,735 lines of code in 230 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript62,8937,95512,347
PHP2162,6685,12211,051
JSON100248
CSS66479
HTML11010

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity6.88
▷ Minimum class complexity1.00
▷ Maximum class complexity116.00
Average method complexity2.14
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces9
Interfaces20
Traits0
Classes192
▷ Abstract classes105.21%
▷ Concrete classes18294.79%
▷ Final classes00.00%
Methods1,136
▷ Static methods161.41%
▷ Public methods1,02690.32%
▷ Protected methods1089.51%
▷ Private methods20.18%
Functions52
▷ Named functions5198.08%
▷ Anonymous functions11.92%
Constants38
▷ Global constants12.63%
▷ Class constants3797.37%
▷ Public constants37100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/top.png1.71KB0.69KB▼ 59.35%