83% vp-news-ticker

Code Review | VP News Ticker

WordPress plugin VP News Ticker scored83%from 54 tests.

About plugin

  • Plugin page: vp-news-ticker
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9
  • WordPress version: 6.3.1
  • First release: Jun 7, 2014
  • Latest release: Jun 7, 2014
  • Number of updates: 5
  • Update frequency: every 0.4 days
  • Top authors: Maruf Arafat (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /909 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼6.37ms] Passed 4 tests

This is a short check of server-side resources used by VP News Ticker
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0141.59 ▼7.69
Dashboard /wp-admin3.32 ▼0.0344.77 ▼18.71
Posts /wp-admin/edit.php3.37 ▲0.0146.85 ▼1.49
Add New Post /wp-admin/post-new.php5.90 ▲0.0197.56 ▲4.32
Media Library /wp-admin/upload.php3.24 ▲0.0134.55 ▲2.40

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for VP News Ticker
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,891 ▲14514.02 ▼0.565.13 ▲3.3039.86 ▼2.35
Dashboard /wp-admin2,210 ▲225.86 ▲0.94107.57 ▼9.5940.52 ▼3.28
Posts /wp-admin/edit.php2,096 ▲102.02 ▼0.0139.73 ▲2.4034.44 ▼1.28
Add New Post /wp-admin/post-new.php1,518 ▼1523.08 ▼0.15624.25 ▼17.3250.25 ▲1.69
Media Library /wp-admin/upload.php1,386 ▼24.19 ▲0.0293.58 ▼4.4239.92 ▼2.97

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/vp-news-ticker/functions.php:17

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 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
Attributes that require attention:
  • Screenshots: Add a description for screenshot #1 in vp-news-ticker/assets to your readme.txt
  • Contributors: The plugin contributors field is not present
The official readme.txt is a good inspiration

vp-news-ticker/functions.php 92% from 13 tests

The main PHP file in "VP News Ticker" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("vp-news-ticker.php" instead of "functions.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected516 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript13067330
CSS103132
PHP110754

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.07
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%
Functions2
▷ Named functions2100.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
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/dl-arr.png0.46KB0.42KB▼ 8.55%
img/controls.png2.08KB1.38KB▼ 33.36%
img/forkme.png7.74KB4.20KB▼ 45.79%