93% pj-news-ticker

Code Review | PJ News Ticker

WordPress plugin PJ News Ticker scored 93% from 53 tests.

About plugin

  • Plugin page: pj-news-ticker
  • Plugin version: 1.9.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.8
  • WordPress version: 5.8.1
  • First release: Jan 5, 2017
  • Latest release: Jul 21, 2021
  • Number of updates: 31
  • Update frequency: every 53.3 days
  • Top authors: pauljura (70.97%)nicolasmontigny (32.26%)

Code review

53 tests

User reviews

6 reviews

Install metrics

4,000+ active / 51,571 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▼260.32ms] Passed 4 tests

This is a short check of server-side resources used by PJ News Ticker
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.92 ▲0.2035.43 ▲16.82
Dashboard /wp-admin3.24 ▲0.1842.76 ▼8.08
Posts /wp-admin/edit.php3.35 ▲0.2444.53 ▼6.64
Add New Post /wp-admin/post-new.php5.60 ▲0.1795.24 ▼1,020.13
Media Library /wp-admin/upload.php3.18 ▲0.1732.20 ▼6.44
PJ News Ticker /wp-admin/options-general.php?page=pj-news-ticker3.1630.06

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by PJ News Ticker
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,806 ▲20016.95 ▲1.3711.84 ▲4.3046.88 ▲0.07
Dashboard /wp-admin2,951 ▲986.57 ▲0.73136.53 ▲2.17108.48 ▲10.69
Posts /wp-admin/edit.php2,733 ▲272.77 ▲0.0968.57 ▼0.77109.85 ▲20.70
Add New Post /wp-admin/post-new.php1,679 ▼1,98918.65 ▼1.84354.79 ▼64.69114.62 ▲9.16
Media Library /wp-admin/upload.php1,797 ▲255.31 ▲0.32120.51 ▼40.21108.47 ▼18.57
PJ News Ticker /wp-admin/options-general.php?page=pj-news-ticker2,2903.3187.7285.71

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled completely, with no zombie files or tables

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
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 2× 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/pj-news-ticker/admin/pj-news-ticker-admin.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/pj-news-ticker/pj-news-ticker.php:172

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Please describe screenshot #3 in pj-news-ticker/assets to your readme.txt
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === pj-news-ticker === )
The official readme.txt is a good inspiration

pj-news-ticker/pj-news-ticker.php 92% from 13 tests

The entry point to "PJ News Ticker" version 1.9.5 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Domain Path: The domain path folder was not found ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected800 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP39048661
JavaScript2111493
CSS26046

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity37.67
▷ Minimum class complexity16.00
▷ Maximum class complexity52.00
Average method complexity3.02
▷ Minimum method complexity1.00
▷ Maximum method complexity47.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods55
▷ Static methods712.73%
▷ Public methods5498.18%
▷ Protected methods11.82%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin