10% sitemap-google-news

Code Review | Sitemap Google News

WordPress plugin Sitemap Google News scored10%from 54 tests.

About plugin

  • Plugin page: sitemap-google-news
  • Plugin version: 0.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4.2
  • WordPress version: 6.3.1
  • First release: Nov 5, 2015
  • Latest release: Feb 26, 2016
  • Number of updates: 9
  • Update frequency: every 12.6 days
  • Top authors: milanezlucas (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,596 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Compile error in wp-content/plugins/sitemap-google-news/google-news-generate.php+68
    'break' not in the 'loop' or 'switch' context

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.98ms] Passed 4 tests

A check of server-side resources used by Sitemap Google News
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0047.02 ▲1.99
Dashboard /wp-admin3.31 ▲0.0046.90 ▼7.78
Posts /wp-admin/edit.php3.36 ▲0.0047.35 ▼1.58
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.01 ▼17.49
Media Library /wp-admin/upload.php3.23 ▲0.0034.42 ▼1.07

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Sitemap Google News
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.13 ▼0.221.79 ▲0.1444.42 ▲2.37
Dashboard /wp-admin2,195 ▲215.63 ▲0.1088.26 ▼7.8241.31 ▼2.03
Posts /wp-admin/edit.php2,103 ▲31.94 ▼0.0542.69 ▲6.7438.31 ▲1.39
Add New Post /wp-admin/post-new.php1,526 ▼322.99 ▼0.64670.63 ▼0.3352.68 ▼3.52
Media Library /wp-admin/upload.php1,397 ▼34.26 ▲0.0599.69 ▼3.2746.92 ▼0.79

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      'break' not in the 'loop' or 'switch' context in wp-content/plugins/sitemap-google-news/google-news-generate.php on line 68
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/sitemap-google-news/google-news.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Donate link: Invalid URI ("")
Please take inspiration from this readme.txt

sitemap-google-news/google-news.php 92% from 13 tests

The principal PHP file in "Sitemap Google News" v. 0.0.2 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("sitemap-google-news.php" instead of "google-news.php")

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
Good job! No executable or dangerous file extensions detected521 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP55924521

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity14.75
▷ Minimum class complexity9.00
▷ Maximum class complexity21.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods22
▷ Static methods00.00%
▷ Public methods1254.55%
▷ Protected methods418.18%
▷ Private methods627.27%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin