84% mission-network-news-headlines-widget

Code Review | Mission Network News Daily Headlines Widget

WordPress plugin Mission Network News Daily Headlines Widget scored84%from 54 tests.

About plugin

  • Plugin page: mission-network-n...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.3
  • WordPress version: 6.3.1
  • First release: Jan 7, 2015
  • Latest release: Aug 21, 2015
  • Number of updates: 6
  • Update frequency: every 37.8 days
  • Top authors: topher1kenobe (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,377 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.12MB] [CPU: ▼9.19ms] Passed 4 tests

Analyzing server-side resources used by Mission Network News Daily Headlines Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1942.45 ▲4.91
Dashboard /wp-admin3.46 ▲0.1245.45 ▼15.64
Posts /wp-admin/edit.php3.51 ▲0.1650.70 ▼3.69
Add New Post /wp-admin/post-new.php5.98 ▲0.1094.24 ▼15.75
Media Library /wp-admin/upload.php3.32 ▲0.1037.13 ▼1.66

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_mnn-headlines-widget
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Mission Network News Daily Headlines Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.16 ▼1.421.86 ▲0.1942.84 ▲2.49
Dashboard /wp-admin2,206 ▲185.79 ▲0.8995.50 ▼3.1436.85 ▼8.35
Posts /wp-admin/edit.php2,092 ▼02.03 ▲0.0242.24 ▼2.5634.66 ▲0.39
Add New Post /wp-admin/post-new.php1,542 ▲2818.17 ▲0.63621.29 ▼60.1746.91 ▼4.20
Media Library /wp-admin/upload.php1,388 ▼34.15 ▼0.0394.29 ▼15.7842.25 ▼3.33

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_mnn-headlines-widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/mission-network-news-headlines-widget/mnn-headlines-wordpress-widget.php:29

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
1 plugin tags: widget

mission-network-news-headlines-widget/mnn-headlines-wordpress-widget.php 85% from 13 tests

"Mission Network News Daily Headlines Widget" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("mission-network-news-headlines-widget.php" instead of "mnn-headlines-wordpress-widget.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin71 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15011571

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods466.67%
▷ Protected methods00.00%
▷ Private methods233.33%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected