84% ping-news

Code Review | Ping News

WordPress plugin Ping News scored84%from 54 tests.

About plugin

  • Plugin page: ping-news
  • Plugin version: 1.0.17
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Jan 9, 2020
  • Latest release: Sep 1, 2023
  • Number of updates: 59
  • Update frequency: every 22.6 days
  • Top authors: omnideveloper (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,464 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.13MB] [CPU: ▼7.86ms] Passed 4 tests

This is a short check of server-side resources used by Ping News
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1439.39 ▼1.48
Dashboard /wp-admin3.44 ▲0.1443.03 ▼10.28
Posts /wp-admin/edit.php3.55 ▲0.1945.38 ▼6.45
Add New Post /wp-admin/post-new.php6.02 ▲0.1379.03 ▼13.21
Media Library /wp-admin/upload.php3.36 ▲0.1335.81 ▲0.20

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Ping News
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲8113.15 ▼1.151.82 ▲0.1945.29 ▼0.53
Dashboard /wp-admin2,219 ▲455.85 ▲0.99100.44 ▼17.1237.68 ▼9.52
Posts /wp-admin/edit.php2,105 ▲162.05 ▲0.0438.90 ▲1.4237.35 ▲1.15
Add New Post /wp-admin/post-new.php6,222 ▲4,68919.28 ▼4.05837.37 ▲169.3160.25 ▼0.96
Media Library /wp-admin/upload.php1,407 ▲194.22 ▲0.01103.61 ▼1.2942.49 ▼0.01

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

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)
Everything seems fine, however this is by no means 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 errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ping-news/trunk/pingnews.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ping-news/pingnews.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: ping, news, valuemynews, ping news, journalism...

ping-news/pingnews.php 85% from 13 tests

"Ping News" version 1.0.17's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 153 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("ping-news.php" instead of "pingnews.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin1,107 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2851911,095
SVG10012

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.28
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%
Functions38
▷ Named functions38100.00%
▷ Anonymous functions00.00%
Constants44
▷ Global constants44100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
trunk/images/ping_logo.png5.01KB3.19KB▼ 36.36%
images/ping_logo.png5.01KB3.19KB▼ 36.36%