84% pull-to-refresh

Code Review | Pull To Resfresh

WordPress plugin Pull To Resfresh scored84%from 54 tests.

About plugin

  • Plugin page: pull-to-refresh
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.0
  • WordPress version: 6.3.1
  • First release: Oct 20, 2014
  • Latest release: Oct 20, 2014
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: joomlaforce (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,726 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.00MB] [CPU: ▼5.48ms] Passed 4 tests

Server-side resources used by Pull To Resfresh
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.09 ▼2.04
Dashboard /wp-admin3.31 ▲0.0144.23 ▼3.96
Posts /wp-admin/edit.php3.36 ▲0.0047.47 ▼2.58
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.57 ▼13.34
Media Library /wp-admin/upload.php3.23 ▲0.0037.10 ▲2.29

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Pull To Resfresh
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,971 ▲23613.71 ▼0.8511.80 ▲10.0250.70 ▲5.85
Dashboard /wp-admin2,206 ▲155.86 ▲0.97106.96 ▲2.8039.77 ▼5.67
Posts /wp-admin/edit.php2,089 ▼31.98 ▼0.0535.83 ▼7.8237.22 ▲1.39
Add New Post /wp-admin/post-new.php1,514 ▼2817.41 ▼0.73683.80 ▲64.7857.93 ▼13.30
Media Library /wp-admin/upload.php1,382 ▼64.20 ▼0.0897.20 ▲1.9941.98 ▲1.85

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • 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 no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pull-to-refresh/pulltorefresh.php:60

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: refresh, pull down, pull to refresh, refresh page

pull-to-refresh/pulltorefresh.php 85% from 13 tests

The primary PHP file in "Pull To Resfresh" version 1.1 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 476 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("pull-to-refresh.php" instead of "pulltorefresh.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected1,726 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript24751,0221,483
PHP17257160
CSS1182481
HTML2002

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/assets/img/spinner.png0.78KB1.00KB0.00%
assets/css/assets/img/arrow.png0.49KB0.57KB0.00%