84% wpm-news-api

Code Review | News Publisher Autopilot

WordPress plugin News Publisher Autopilot scored84%from 54 tests.

About plugin

  • Plugin page: wpm-news-api
  • Plugin version: 2.1.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-6.0
  • WordPress version: 6.3.1
  • First release: Feb 16, 2020
  • Latest release: Jun 6, 2022
  • Number of updates: 40
  • Update frequency: every 21.4 days
  • Top authors: cdowp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /5,436 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼1.90ms] Passed 4 tests

Analyzing server-side resources used by News Publisher Autopilot
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0836.51 ▼4.75
Dashboard /wp-admin3.36 ▲0.0648.13 ▼0.15
Posts /wp-admin/edit.php3.47 ▲0.1246.89 ▼1.95
Add New Post /wp-admin/post-new.php5.96 ▲0.0791.41 ▼0.29
Media Library /wp-admin/upload.php3.28 ▲0.0636.79 ▼0.59
Settings /wp-admin/admin.php?page=wpm-settings3.2632.62
Help /wp-admin/admin.php?page=wpm-api-help3.2532.88

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 36 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
News Publisher Autopilot
widget_recent-comments
erroroption
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for News Publisher Autopilot
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,859 ▲12413.68 ▼0.761.57 ▼0.1542.07 ▼4.56
Dashboard /wp-admin2,261 ▲735.88 ▲0.95101.32 ▲1.4139.25 ▲0.07
Posts /wp-admin/edit.php2,147 ▲582.03 ▲0.0336.93 ▲1.0830.69 ▼0.80
Add New Post /wp-admin/post-new.php1,564 ▲3118.34 ▼4.62600.18 ▼58.7252.97 ▼1.15
Media Library /wp-admin/upload.php1,448 ▲664.28 ▼0.1098.20 ▲0.1039.89 ▼5.96
Settings /wp-admin/admin.php?page=wpm-settings1,0301.9627.3874.96
Help /wp-admin/admin.php?page=wpm-api-help8781.9329.9335.72

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 detected upon uninstall: 7 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • News Publisher Autopilot
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

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
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
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wpm-news-api/wpm-news-api-settings.php:5

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 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Contributors: The plugin contributors field is not present
The official readme.txt is a good inspiration

wpm-news-api/wpm-news-api.php 92% from 13 tests

The principal PHP file in "News Publisher Autopilot" v. 2.1.4 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 141 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin10,674 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
SVG30129,026
PHP51647081,107
CSS42312251
PO File15757161
JavaScript51138129

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity81.50
▷ Minimum class complexity12.00
▷ Maximum class complexity151.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods47
▷ Static methods00.00%
▷ Public methods4085.11%
▷ Protected methods00.00%
▷ Private methods714.89%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants30
▷ Global constants30100.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
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/wpm-news-api-128x128.png21.94KB8.81KB▼ 59.84%
images/hook2.png3.60KB0.44KB▼ 87.67%
images/iconfinder_icon-news_2867930.png0.77KB0.68KB▼ 11.87%