78% jquery-latest-news-ticker

Code Review | jQuery Latest News Ticker

WordPress plugin jQuery Latest News Ticker scored78%from 54 tests.

About plugin

  • Plugin page: jquery-latest-new...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-3.8
  • WordPress version: 6.3.1
  • First release: Feb 3, 2014
  • Latest release: Apr 5, 2014
  • Number of updates: 26
  • Update frequency: every 2.4 days
  • Top authors: himadriganguly (92.31%)Otto42 (11.54%)

Code review

54 tests

User reviews

2 reviews

Install metrics

70+ active /7,783 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.13MB] [CPU: ▼6.98ms] Passed 4 tests

Analyzing server-side resources used by jQuery Latest News Ticker
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0245.72 ▲3.60
Dashboard /wp-admin3.51 ▲0.1350.56 ▼13.06
Posts /wp-admin/edit.php3.62 ▲0.2348.76 ▼1.12
Add New Post /wp-admin/post-new.php6.11 ▲0.1982.37 ▼14.58
Media Library /wp-admin/upload.php3.43 ▲0.1737.58 ▲0.86
All Latest News Tickers /wp-admin/edit.php?post_type=latest_news_ticker3.4735.99
Add New /wp-admin/post-new.php?post_type=latest_news_ticker3.4644.99

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 36 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for jQuery Latest News Ticker
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,929 ▲18313.67 ▼0.694.96 ▲3.1037.51 ▼4.42
Dashboard /wp-admin2,249 ▲644.95 ▼0.90101.09 ▼23.3440.68 ▼1.54
Posts /wp-admin/edit.php2,139 ▲502.26 ▲0.2541.74 ▲5.8935.64 ▲1.95
Add New Post /wp-admin/post-new.php1,555 ▲4123.23 ▲5.80670.15 ▼17.0273.31 ▲19.35
Media Library /wp-admin/upload.php1,437 ▲554.36 ▲0.14104.78 ▲1.9646.17 ▲3.41
All Latest News Tickers /wp-admin/edit.php?post_type=latest_news_ticker1,1032.2432.9328.41
Add New /wp-admin/post-new.php?post_type=latest_news_ticker1,8722.7655.0441.92

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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 fix the following items
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'ColourDrift_Post_Type' not found in wp-content/plugins/jquery-latest-news-ticker/includes/post-types.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/jquery-latest-news-ticker/includes/shortcodes.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/jquery-latest-news-ticker/includes/scripts.php:22
    • > PHP Warning
      Use of undefined constant WP_DEBUG - assumed 'WP_DEBUG' (this will throw an Error in a future version of PHP) in wp-content/plugins/jquery-latest-news-ticker/jquery-latest-news-ticker.php on line 33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/jquery-latest-news-ticker/jquery-latest-news-ticker.php:38

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/edit.php?post_type=latest_news_ticker
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/jquery-latest-news-ticker/includes/js/custom_post_admin.js?ver=1.0.0-1696824935:57:44)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=latest_news_ticker
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function
    • > GET request to /wp-admin/post-new.php?post_type=latest_news_ticker
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/jquery-latest-news-ticker/includes/js/custom_post_admin.js?ver=1.0.0-1696824937:57:44)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: ticker, news, news ticker, jquery, scrolling...

jquery-latest-news-ticker/jquery-latest-news-ticker.php 92% from 13 tests

Analyzing the main PHP file in "jQuery Latest News Ticker" version 1.0.2
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 310 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
There were no executable files found in this plugin1,551 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP8273209933
JavaScript25486391
CSS51728227

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions32
▷ Named functions2784.38%
▷ Anonymous functions515.62%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
16 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/css/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
includes/css/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
includes/css/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
includes/css/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
includes/css/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%