78% recent-topics-for-ipboard

Code Review | IPS Community Recent Topics

WordPress plugin IPS Community Recent Topics scored78%from 54 tests.

About plugin

  • Plugin page: recent-topics-for...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.1.0
  • WordPress version: 6.3.1
  • First release: Jun 22, 2016
  • Latest release: Sep 11, 2019
  • Number of updates: 22
  • Update frequency: every 53.7 days
  • Top authors: thekrotek (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,346 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

Analyzing server-side resources used by IPS Community Recent Topics
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1439.26 ▼7.62
Dashboard /wp-admin3.43 ▲0.1346.27 ▼4.55
Posts /wp-admin/edit.php3.55 ▲0.1948.65 ▼7.64
Add New Post /wp-admin/post-new.php6.02 ▲0.1384.26 ▼7.78
Media Library /wp-admin/upload.php3.36 ▲0.1334.79 ▼2.75

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_ipbrecent

Browser metrics Passed 4 tests

A check of browser resources used by IPS Community Recent Topics
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.24 ▼0.112.17 ▲0.5645.38 ▲0.98
Dashboard /wp-admin2,195 ▲185.63 ▼0.1382.58 ▼3.3039.39 ▼7.77
Posts /wp-admin/edit.php2,100 ▼02.01 ▼0.0234.13 ▲0.3935.11 ▼0.19
Add New Post /wp-admin/post-new.php1,526 ▼523.47 ▲0.35678.86 ▲44.2552.82 ▼1.23
Media Library /wp-admin/upload.php1,400 ▲34.19 ▼0.0797.30 ▼0.6741.00 ▼0.66

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
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_ipbrecent
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% 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
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/recent-topics-for-ipboard/ipbrecent.php
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Notice
      Undefined variable: fields in wp-content/plugins/recent-topics-for-ipboard/helpers/fields.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/recent-topics-for-ipboard/settings.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/recent-topics-for-ipboard/helpers/widget.php:12
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/recent-topics-for-ipboard/helpers/fields.php on line 12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention: You can take inspiration from this readme.txt

recent-topics-for-ipboard/ipbrecent.php 85% from 13 tests

The principal PHP file in "IPS Community Recent Topics" v. 1.0.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("recent-topics-for-ipboard.php" instead of "ipbrecent.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
No dangerous file extensions were detected1,009 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP412037451
CSS2723441
PO File1450104
JavaScript11013

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity36.50
▷ Minimum class complexity6.00
▷ Maximum class complexity67.00
Average method complexity4.89
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin