84% simple-news

Code Review | Simple News

WordPress plugin Simple News scored84%from 54 tests.

About plugin

  • Plugin page: simple-news
  • Plugin version: 2.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1
  • WordPress version: 6.3.1
  • First release: Aug 27, 2015
  • Latest release: Dec 13, 2022
  • Number of updates: 153
  • Update frequency: every 17.4 days
  • Top authors: MortenPeterAndersen (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

2,000+ active /41,736 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼12.22ms] Passed 4 tests

A check of server-side resources used by Simple News
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0541.49 ▼1.17
Dashboard /wp-admin3.34 ▼0.0045.60 ▼20.89
Posts /wp-admin/edit.php3.40 ▲0.0445.97 ▼7.34
Add New Post /wp-admin/post-new.php6.03 ▲0.1585.20 ▼19.49
Media Library /wp-admin/upload.php3.26 ▲0.0435.64 ▼0.21
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=news3.2641.76
News /wp-admin/edit.php?post_type=news3.3238.13
Add New /wp-admin/post-new.php?post_type=news6.0387.61
News Tags /wp-admin/edit-tags.php?taxonomy=newstags&post_type=news3.2634.94

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
category_children
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Simple News
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8314.29 ▲0.021.74 ▼0.2442.87 ▼4.25
Dashboard /wp-admin2,227 ▲505.49 ▼0.1789.56 ▼8.9839.26 ▼5.93
Posts /wp-admin/edit.php2,132 ▲322.02 ▼0.0135.36 ▼2.3732.93 ▼0.75
Add New Post /wp-admin/post-new.php1,555 ▲2923.46 ▼0.06681.99 ▲24.0554.14 ▼5.02
Media Library /wp-admin/upload.php1,435 ▲324.17 ▼0.03100.46 ▲1.8745.68 ▲4.55
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=news1,4872.1330.8135.72
News /wp-admin/edit.php?post_type=news1,1961.9934.9131.90
Add New /wp-admin/post-new.php?post_type=news6,25122.78877.1131.55
News Tags /wp-admin/edit-tags.php?taxonomy=newstags&post_type=news1,2782.1228.2031.11

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • category_children

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
Good news, no errors were detected

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
Please fix the following items
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/simple-news/files/shortcode.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-news/news.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-news/files/admin.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/simple-news/files/widget.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-news/files/widget-text.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/simple-news/files/templates/archive-news.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

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
3 plugin tags: simple news, news list, news

simple-news/news.php 85% from 13 tests

The primary PHP file in "Simple News" version 2.8 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("simple-news.php" instead of "news.php")
  • Domain Path: The domain path is invalid: folder "/translation" does not exist

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 plugin429 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP711171359
CSS217070

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.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
There were not PNG files found in your plugin