10% newsboard

Code Review | NewsBoard Post and RSS Scroller

WordPress plugin NewsBoard Post and RSS Scroller scored10%from 54 tests.

About plugin

  • Plugin page: newsboard
  • Plugin version: 1.2.12
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.2.2
  • WordPress version: 6.3.1
  • First release: Jan 30, 2013
  • Latest release: Jun 17, 2015
  • Number of updates: 170
  • Update frequency: every 5.1 days
  • Top authors: NewsBoard Plugin Team (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

100+ active /22,450 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/newsboard/classes/nbpUpgrade.php+38
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.51MB] [CPU: ▼54.97ms] Passed 4 tests

Analyzing server-side resources used by NewsBoard Post and RSS Scroller
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.49 ▼0.979.00 ▼31.64
Dashboard /wp-admin2.51 ▼0.8310.86 ▼54.80
Posts /wp-admin/edit.php2.52 ▼0.8410.09 ▼40.93
Add New Post /wp-admin/post-new.php2.51 ▼3.389.17 ▼92.49
Media Library /wp-admin/upload.php2.52 ▼0.7110.95 ▼26.13

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 49 new files
Database: no new tables, 10 new options
New WordPress options
widget_nbpwidget
widget_recent-posts
category_children
can_compress_scripts
newsboard-main
db_upgraded
newsboard-appearance
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for NewsBoard Post and RSS Scroller
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,933 ▲18713.87 ▼0.4913.34 ▲11.7242.47 ▲1.20
Dashboard /wp-admin2,221 ▲405.51 ▼0.2081.08 ▼23.2277.45 ▲28.00
Posts /wp-admin/edit.php2,135 ▲352.00 ▲0.0132.83 ▼7.0635.01 ▼1.89
Add New Post /wp-admin/post-new.php1,573 ▲4722.90 ▼0.77693.90 ▲34.5457.41 ▼8.60
Media Library /wp-admin/upload.php1,441 ▲444.19 ▼0.10103.94 ▲2.8577.24 ▲30.11
Themes /wp-admin/nbpCore.php?page=NewsBoardThemes260.420.0814.72
Items /wp-admin/nbpCore.php?page=NewsBoardItems260.420.115.87
Settings /wp-admin/nbpCore.php260.420.076.31
View /wp-admin/nbpCore.php?page=NewsBoardView260.420.086.95
Upgrade /wp-admin/nbpCore.php?page=NewsBoardUpgrade260.420.096.07

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/newsboard/classes/nbpUpgrade.php+38
    Trying to access array offset on value of type bool
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_nbpwidget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • category_children
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
  • 12× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/newsboard/newsboard.php on line 25
    • > PHP Notice
      Undefined index: width in wp-content/plugins/newsboard/classes/nbpThumbcreate.php on line 113
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/newsboard/classes/nbpWidget.php:8
    • > PHP Warning
      require_once(WP_PLUGIN_DIR/newsboard/newsboard-constants.php): failed to open stream: No such file or directory in wp-content/plugins/newsboard/newsboard.php on line 25
    • > PHP Notice
      Undefined index: rheight in wp-content/plugins/newsboard/classes/nbpThumbcreate.php on line 116
    • > PHP Fatal error
      Uncaught Error: Class 'nbpCore' not found in wp-content/plugins/newsboard/classes/nbpInit.php:8
    • > PHP Notice
      Undefined index: height in wp-content/plugins/newsboard/classes/nbpThumbcreate.php on line 114
    • > PHP Warning
      getimagesize(): Filename cannot be empty in wp-content/plugins/newsboard/classes/nbpThumbcreate.php on line 50
    • > PHP Fatal error
      Uncaught Error: Call to undefined method cropImage::imgCF() in wp-content/plugins/newsboard/classes/nbpThumbcreate.php:53
    • > PHP Notice
      Undefined index: src in wp-content/plugins/newsboard/classes/nbpThumbcreate.php on line 112

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/nbpCore.php?page=NewsBoardThemes
    • > Network (severe)
    wp-admin/nbpCore.php?page=NewsBoardThemes - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/nbpCore.php?page=NewsBoardItems
    • > Network (severe)
    wp-admin/nbpCore.php?page=NewsBoardItems - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/nbpCore.php
    • > Network (severe)
    wp-admin/nbpCore.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/nbpCore.php?page=NewsBoardView
    • > Network (severe)
    wp-admin/nbpCore.php?page=NewsBoardView - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/nbpCore.php?page=NewsBoardUpgrade
    • > Network (severe)
    wp-admin/nbpCore.php?page=NewsBoardUpgrade - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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
These attributes need your attention:
  • Tags: You are using too many tags: 30 tag instead of maximum 10
You can look at the official readme.txt

newsboard/newsboard.php Passed 13 tests

The principal PHP file in "NewsBoard Post and RSS Scroller" v. 1.2.12 is loaded by WordPress automatically on each request
21 characters long description:
Post and RSS Scroller

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 detected2,645 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP142254821,548
CSS211703
JavaScript8441394

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity20.00
▷ Minimum class complexity3.00
▷ Maximum class complexity81.00
Average method complexity2.86
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods92
▷ Static methods00.00%
▷ Public methods6570.65%
▷ Protected methods00.00%
▷ Private methods2729.35%
Functions0
▷ Named functions00.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
13 PNG files occupy 0.11MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/logo.png0.54KB0.73KB0.00%
images/custom.png24.11KB18.53KB▼ 23.14%
images/admin_right_arrow.png1.42KB1.55KB0.00%
images/go_pro.png0.85KB0.59KB▼ 30.31%
images/no_image.png4.75KB2.43KB▼ 48.77%