78% zip-news

Code Review | Zip.News API

WordPress plugin Zip.News API scored 78% from 53 tests.

About plugin

  • Plugin page: zip-news
  • Plugin version: 1.5.0
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.8
  • WordPress version: 5.8.1
  • First release: Mar 23, 2021
  • Latest release: Oct 12, 2021
  • Number of updates: 28
  • Update frequency: every 7.3 days
  • Top authors: atanasbalevsky (100%)

Code review

53 tests

User reviews

1 review

Install metrics

10+ active / 271 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

A check of server-side resources used by Zip.News API
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.1626.12 ▲6.36
Dashboard /wp-admin3.16 ▲0.1141.99 ▼8.15
Posts /wp-admin/edit.php3.21 ▲0.1038.45 ▲0.76
Add New Post /wp-admin/post-new.php5.46 ▲0.0392.01 ▼1,058.57
Media Library /wp-admin/upload.php3.04 ▲0.0431.82 ▼11.56
Zip.News Settings /wp-admin/options-general.php?page=znaw3.0125.74

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 1 new option
New WordPress options
widget_znaw_zipnewswidget

Browser metrics Passed 4 tests

Zip.News API: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,730 ▲12415.95 ▲0.369.74 ▲1.2148.64 ▲4.00
Dashboard /wp-admin2,987 ▲1376.11 ▲0.24148.37 ▲1.07100.70 ▼1.25
Posts /wp-admin/edit.php2,733 ▲302.70 ▲0.0265.34 ▼1.2892.09 ▼2.92
Add New Post /wp-admin/post-new.php1,866 ▲27817.74 ▼3.60348.33 ▲79.07107.83 ▲5.54
Media Library /wp-admin/upload.php1,804 ▲325.05 ▲0.03144.80 ▼33.98111.25 ▼30.28
Zip.News Settings /wp-admin/options-general.php?page=znaw1,0622.0956.5370.45

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 1 option in the database
    • widget_znaw_zipnewswidget

Smoke tests 50% 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/zip-news/templates/related-articles.php
  • 4× 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/zip-news/zipnews-widget.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/zip-news/admin-notice.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/zip-news/settings.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/zip-news/zipnews-widget.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: news, api, articles, zipnews, news api...

zip-news/wordpress-zipnews.php 85% from 13 tests

The primary PHP file in "Zip.News API" version 1.5.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("zip-news.php" instead of "wordpress-zipnews.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
There were no executable files found in this plugin625 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP64224565
CSS19160

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity84.00
▷ Minimum class complexity84.00
▷ Maximum class complexity84.00
Average method complexity21.75
▷ Minimum method complexity1.00
▷ Maximum method complexity60.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%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin