10% news-in-pictures

Code Review | Go News In Pictures

WordPress plugin Go News In Pictures scored 10% from 54 tests.

About plugin

  • Plugin page: news-in-pictures
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.9.2
  • WordPress version: 6.3.1
  • First release: Aug 9, 2014
  • Latest release: Aug 9, 2014
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: goresponsive (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

80+ active / 3,102 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/news-in-pictures/goNewsinpictures.php+17
    Methods with the same name as their class will not be constructors in a future version of PHP; newsinpic_widget has a deprecated constructor

Server metrics [RAM: ▼1.71MB] [CPU: ▼49.03ms] Passed 4 tests

Analyzing server-side resources used by Go News In Pictures
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.189.30 ▼34.90
Dashboard /wp-admin2.29 ▼1.019.70 ▼47.92
Posts /wp-admin/edit.php2.29 ▼1.069.91 ▼34.85
Add New Post /wp-admin/post-new.php2.29 ▼3.5911.60 ▼78.44
Media Library /wp-admin/upload.php2.29 ▼0.9410.03 ▼23.89

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments
widget_newspic-widget
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Go News In Pictures
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.29 ▼1.091.83 ▼0.0246.85 ▲1.75
Dashboard /wp-admin2,209 ▲245.88 ▲0.9998.26 ▼8.0339.32 ▼3.06
Posts /wp-admin/edit.php2,086 ▼32.00 ▼0.0335.51 ▼0.5333.56 ▼1.97
Add New Post /wp-admin/post-new.php1,528 ▼718.30 ▼4.97620.40 ▼45.9350.21 ▼14.78
Media Library /wp-admin/upload.php1,388 ▼34.18 ▼0.0192.38 ▼5.4740.72 ▼4.89

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in newsinpic_widget is deprecated since version 4.3.0! Use __construct() instead.
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_newspic-widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/news-in-pictures/goNewsinpictures.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (screenshot-1.png - Widget Options), #2 (screenshot-2.png - Front end)
Please take inspiration from this readme.txt

news-in-pictures/goNewsinpictures.php 92% from 13 tests

The principal PHP file in "Go News In Pictures" v. 1.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("news-in-pictures.php" instead of "goNewsinpictures.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected80 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP115880

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.06
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.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%
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
2 PNG files occupy 0.26MB with 0.15MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png262.80KB52.43KB▼ 80.05%
screenshot-1.png7.30KB5.05KB▼ 30.79%