83% newsticker

Code Review | News Ticker

WordPress plugin News Ticker scored83%from 54 tests.

About plugin

  • Plugin page: newsticker
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9
  • WordPress version: 6.3.1
  • First release: Jun 16, 2015
  • Latest release: Jun 16, 2015
  • Number of updates: 3
  • Update frequency: every 1.3 days
  • Top authors: Fazilatunnesa (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,943 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by News Ticker
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.64 ▼6.82
Dashboard /wp-admin3.31 ▲0.0048.90 ▼0.18
Posts /wp-admin/edit.php3.36 ▲0.0051.52 ▲4.18
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.05 ▼10.22
Media Library /wp-admin/upload.php3.23 ▲0.0036.58 ▲0.07

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for News Ticker
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,880 ▲9413.83 ▼0.517.88 ▲5.9041.26 ▼3.12
Dashboard /wp-admin2,196 ▲165.63 ▼0.0691.04 ▲0.5140.17 ▼6.33
Posts /wp-admin/edit.php2,104 ▲41.99 ▼0.0438.67 ▲0.3435.98 ▼4.38
Add New Post /wp-admin/post-new.php1,533 ▲523.26 ▲0.12661.40 ▲20.9057.61 ▲9.86
Media Library /wp-admin/upload.php1,404 ▲44.13 ▼0.10102.69 ▼4.2544.56 ▼2.82

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

Smoke tests 75% 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)
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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/newsticker/main-function.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Contributors: The plugin contributors field is missing
Please take inspiration from this readme.txt

newsticker/main-function.php 85% from 13 tests

The entry point to "News Ticker" version 1.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("newsticker.php" instead of "main-function.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 145 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin52 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP117846
CSS1005
JavaScript1011

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.06
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
images/icon.png1.28KB0.45KB▼ 64.40%