84% nova-dashboard-widget-bbc-news

Code Review | Nova Dashboard Widget - BBC News

WordPress plugin Nova Dashboard Widget - BBC News scored84%from 54 tests.

About plugin

  • Plugin page: nova-dashboard-wi...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.6.1
  • WordPress version: 6.3.1
  • First release: Sep 24, 2013
  • Latest release: Oct 9, 2013
  • Number of updates: 4
  • Update frequency: every 3.8 days
  • Top authors: spike2828 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,760 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 gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼4.05ms] Passed 4 tests

Analyzing server-side resources used by Nova Dashboard Widget - BBC News
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.61 ▼8.19
Dashboard /wp-admin7.63 ▲4.2968.70 ▲10.18
Posts /wp-admin/edit.php3.40 ▲0.0547.28 ▲2.08
Add New Post /wp-admin/post-new.php5.93 ▲0.0583.06 ▼12.90
Media Library /wp-admin/upload.php3.27 ▲0.0533.42 ▲2.82

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Nova Dashboard Widget - BBC News
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,490 ▲74413.36 ▼1.021.61 ▼0.0144.72 ▲1.69
Dashboard /wp-admin2,896 ▲7055.03 ▲0.15113.72 ▼3.0547.66 ▲1.81
Posts /wp-admin/edit.php2,086 ▼32.01 ▼0.0440.70 ▲6.4336.84 ▲2.81
Add New Post /wp-admin/post-new.php1,542 ▲922.94 ▼0.15629.21 ▼6.8756.11 ▲9.45
Media Library /wp-admin/upload.php1,391 ▲34.18 ▼0.0596.69 ▼7.3539.82 ▼3.22

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 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/nova-dashboard-widget-bbc-news/nova-dashboard-widget-bbc-news.php:56

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === nova-dashboard-widget-bbc-news === )
The official readme.txt is a good inspiration

nova-dashboard-widget-bbc-news/nova-dashboard-widget-bbc-news.php Passed 13 tests

The entry point to "Nova Dashboard Widget - BBC News" version 2.0 is a PHP file that has certain tags in its header comment area
72 characters long description:
A simple plugin that adds a BBC News RSS feed to your worpress dashboard

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected232 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14632232

PHP code Passed 2 tests

An short overview of 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.27
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%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected