84% wp-news-sitemap

Code Review | WP News Sitemap

WordPress plugin WP News Sitemap scored84%from 54 tests.

About plugin

  • Plugin page: wp-news-sitemap
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.5.1
  • WordPress version: 6.3.1
  • First release: Oct 8, 2020
  • Latest release: Oct 16, 2020
  • Number of updates: 4
  • Update frequency: every 2.0 days
  • Top authors: thebetterindia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /727 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

A check of server-side resources used by WP News Sitemap
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0540.86 ▲2.29
Dashboard /wp-admin3.37 ▲0.0246.31 ▼13.64
Posts /wp-admin/edit.php3.42 ▲0.0642.85 ▼2.79
Add New Post /wp-admin/post-new.php5.95 ▲0.0692.79 ▼8.60
Media Library /wp-admin/upload.php3.29 ▲0.0633.58 ▼0.80
WPNS Settings /wp-admin/options-general.php?page=wpns-settings3.2628.56

Server storage [IO: ▲0.02MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Please try to fix the following items
  • Illegal file modification found: 1 file (1.69KB) outside of "wp-content/plugins/wp-news-sitemap/" and "wp-content/uploads/"
    • (new file) sitemap-news.xml
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for WP News Sitemap
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.21 ▼0.381.74 ▼0.2144.54 ▲6.18
Dashboard /wp-admin2,199 ▲195.54 ▼0.1381.36 ▼5.0236.61 ▼7.08
Posts /wp-admin/edit.php2,104 ▲42.03 ▼0.0135.62 ▼0.1035.79 ▲1.32
Add New Post /wp-admin/post-new.php1,539 ▲418.32 ▲0.07604.92 ▼32.3960.21 ▼6.35
Media Library /wp-admin/upload.php1,404 ▲44.19 ▼0.0295.62 ▼0.7842.55 ▼5.39
WPNS Settings /wp-admin/options-general.php?page=wpns-settings8012.0026.0832.29

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

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

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 14× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      require_once(WPNS_PATHadmin/wp-plugin-settings.php): failed to open stream: No such file or directory in wp-content/plugins/wp-news-sitemap/admin/index.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/wp-news-sitemap/admin/wp-plugin-settings-view.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-news-sitemap/public/ping-sitemap.php:49
    • > PHP Warning
      Use of undefined constant WPNS_PATH - assumed 'WPNS_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-news-sitemap/includes/index.php on line 6
    • > PHP Warning
      Use of undefined constant WPNS_PATH - assumed 'WPNS_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-news-sitemap/admin/index.php on line 5
    • > PHP Fatal error
      require_once(): Failed opening required 'WPNS_PATHincludes/helpers.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-news-sitemap/includes/index.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-news-sitemap/wp-news-sitemap.php:20
    • > PHP Fatal error
      require_once(): Failed opening required 'WPNS_PATHpublic/ping-sitemap.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-news-sitemap/public/index.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-news-sitemap/admin/wp-plugin-settings.php:48
    • > PHP Warning
      Use of undefined constant WPNS_PATH - assumed 'WPNS_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-news-sitemap/public/index.php on line 6

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: news sitemap, sitemaps, auto ping

wp-news-sitemap/wp-news-sitemap.php Passed 13 tests

The main file in "WP News Sitemap" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
58 characters long description:
This plugin is used to create and auto submit news sitemap

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin308 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP96280283
Markdown110025

PHP code Passed 2 tests

An short overview of 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 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%
Constants2
▷ Global constants2100.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