83% gazeta-news

Code Review | Plugin Gazeta News - Gazeta da Ilha

WordPress plugin Plugin Gazeta News - Gazeta da Ilha scored83%from 54 tests.

About plugin

  • Plugin page: gazeta-news
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Nov 5, 2012
  • Latest release: Mar 1, 2013
  • Number of updates: 11
  • Update frequency: every 10.8 days
  • Top authors: erick.pessoa (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,219 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.64ms] Passed 4 tests

A check of server-side resources used by Plugin Gazeta News - Gazeta da Ilha
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.90 ▲2.58
Dashboard /wp-admin3.31 ▲0.0148.98 ▼5.60
Posts /wp-admin/edit.php3.37 ▲0.0145.60 ▼1.81
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.31 ▼17.72
Media Library /wp-admin/upload.php3.24 ▲0.0141.49 ▲7.31

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_websisti_ginewswidget-widgets

Browser metrics Passed 4 tests

Checking browser requirements for Plugin Gazeta News - Gazeta da Ilha
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.17 ▼0.231.65 ▼0.1044.18 ▲3.62
Dashboard /wp-admin2,192 ▲185.48 ▼0.2886.79 ▼4.2137.24 ▼1.51
Posts /wp-admin/edit.php2,103 ▲61.98 ▼0.0536.37 ▼0.3734.61 ▼12.27
Add New Post /wp-admin/post-new.php1,526 ▼023.04 ▼0.24659.69 ▼6.7257.37 ▼4.65
Media Library /wp-admin/upload.php1,403 ▲64.17 ▼0.02105.02 ▲0.7345.74 ▼1.35

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_websisti_ginewswidget-widgets
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, 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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/gazeta-news/gazetailhanews-widget.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 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
Attributes that require attention:
  • Screenshots: Screenshot #1 (Assim é o plugin em execução: '/assets/screenshot-1.png') image missing
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === gazeta-news === )
The official readme.txt might help

gazeta-news/gazetailhanews-widget.php 92% from 13 tests

The main PHP script in "Plugin Gazeta News - Gazeta da Ilha" version 0.3 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("gazeta-news.php" instead of "gazetailhanews-widget.php")

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
No dangerous file extensions were detected183 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13538183

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity24.00
▷ Minimum class complexity24.00
▷ Maximum class complexity24.00
Average method complexity5.60
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods480.00%
▷ Protected methods00.00%
▷ Private methods120.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
ultimos_geral.png0.68KB0.56KB▼ 18.25%
ultimos_maranhao.png0.79KB0.67KB▼ 14.62%
ultimos_politica.png0.76KB0.63KB▼ 16.26%
ultimos_esportes.png0.74KB0.63KB▼ 15.24%
screenshot-1.png29.97KB11.87KB▼ 60.40%