90% news-articles

Code Review | News Articles

WordPress plugin News Articles scored 90% from 54 tests.

About plugin

  • Plugin page: news-articles
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.8
  • WordPress version: 5.8.1
  • First release: Oct 24, 2017
  • Latest release: Jan 30, 2018
  • Number of updates: 5
  • Update frequency: every 19.8 days
  • Top authors: eriksaulnier (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 670 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.11MB] [CPU: ▼143.12ms] Passed 4 tests

Server-side resources used by News Articles
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.93 ▲0.2134.94 ▲16.56
Dashboard /wp-admin3.16 ▲0.1047.44 ▲1.28
Posts /wp-admin/edit.php3.27 ▲0.1647.02 ▲8.41
Add New Post /wp-admin/post-new.php5.52 ▲0.0992.13 ▼578.42
Media Library /wp-admin/upload.php3.10 ▲0.1030.06 ▼3.74
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=article3.1032.79
All Articles /wp-admin/edit.php?post_type=article3.1536.38
Add New /wp-admin/post-new.php?post_type=article3.1753.96
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=article3.0938.36

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: no new tables, 1 new option
New WordPress options
category_children

Browser metrics Passed 4 tests

A check of browser resources used by News Articles
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,728 ▲13216.26 ▲0.5910.11 ▼0.7643.01 ▼4.22
Dashboard /wp-admin3,015 ▲845.87 ▼0.17122.82 ▼33.20104.45 ▼14.92
Posts /wp-admin/edit.php2,784 ▲452.73 ▲0.0278.94 ▲13.9081.08 ▼2.54
Add New Post /wp-admin/post-new.php1,712 ▲2918.72 ▲0.29372.74 ▼21.15109.05 ▼3.78
Media Library /wp-admin/upload.php1,852 ▲455.03 ▼0.05152.36 ▲3.42120.08 ▲2.10
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=article1,8712.3961.3681.15
All Articles /wp-admin/edit.php?post_type=article1,5082.6272.1375.56
Add New /wp-admin/post-new.php?post_type=article2,5914.77113.5593.94
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=article1,9552.3965.5686.32

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 1 option
    • category_children

Smoke tests Passed 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 Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: scraper, link, article, news

news-articles/news-articles.php Passed 13 tests

The entry point to "News Articles" version 1.0.0 is a PHP file that has certain tags in its header comment area
76 characters long description:
Adds a custom post type which allows you to post news articles on your site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin382 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP13109536382

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity4.75
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity2.07
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods28
▷ Static methods27.14%
▷ Public methods2278.57%
▷ Protected methods00.00%
▷ Private methods621.43%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin