62% phpbb-recent-topics

Code Review | phpbb_recent_topics

WordPress plugin phpbb_recent_topics scored62%from 54 tests.

About plugin

  • Plugin page: phpbb-recent-topics
  • Plugin version: 0.7.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.9-3.2
  • WordPress version: 6.3.1
  • First release: Mar 22, 2007
  • Latest release: Jul 8, 2011
  • Number of updates: 72
  • Update frequency: every 26.4 days
  • Top authors: linickx (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /24,214 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.15MB] [CPU: ▼10.95ms] Passed 4 tests

This is a short check of server-side resources used by phpbb_recent_topics
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.60 ▼0.22
Dashboard /wp-admin3.22 ▼0.0931.19 ▼20.62
Posts /wp-admin/edit.php3.28 ▼0.0836.51 ▼9.48
Add New Post /wp-admin/post-new.php5.46 ▼0.4281.23 ▼12.32
Media Library /wp-admin/upload.php3.22 ▼0.0131.11 ▼1.38
phpBB Recent Topics /wp-admin/options-general.php?page=phpbb-recent-topics3.1932.72

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

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

Browser metrics Passed 4 tests

Checking browser requirements for phpbb_recent_topics
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.56 ▼0.832.00 ▼0.0642.93 ▼0.28
Dashboard /wp-admin2,213 ▲254.82 ▼0.05105.59 ▼9.8941.80 ▼6.69
Posts /wp-admin/edit.php2,093 ▲42.02 ▲0.0337.14 ▲1.8533.10 ▼4.01
Add New Post /wp-admin/post-new.php1,536 ▲823.21 ▲4.72687.09 ▲49.4951.73 ▼6.87
Media Library /wp-admin/upload.php1,389 ▲44.21 ▼0.06104.64 ▼1.5545.07 ▲1.00
phpBB Recent Topics /wp-admin/options-general.php?page=phpbb-recent-topics8691.146.7423.15

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5453
    Function register_sidebar_widget is deprecated since version 2.8.0! Use wp_register_sidebar_widget() instead.
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=phpbb-recent-topics
    • > User deprecated in wp-includes/functions.php+5828
    Hook contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/phpbb-recent-topics/display/admin-options-help.inc.php
  • 11× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'WP_PLUGIN_DIR/phpbb-recent-topics/upgrade.php' (include_path='.:/usr/share/php') in wp-content/plugins/phpbb-recent-topics/phpbb_recent_topics.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function update_option() in wp-content/plugins/phpbb-recent-topics/display/admin-options.php:26
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/phpbb-recent-topics/phpbb_recent_topics.php on line 12
    • > PHP Notice
      Undefined variable: lnx_PRT_options in wp-content/plugins/phpbb-recent-topics/display/admin-options.php on line 5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/phpbb-recent-topics/display/display.php on line 32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/phpbb-recent-topics/upgrade.php:7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/phpbb-recent-topics/display/display.php on line 10
    • > PHP Warning
      require_once(WP_PLUGIN_DIR/phpbb-recent-topics/upgrade.php): failed to open stream: No such file or directory in wp-content/plugins/phpbb-recent-topics/phpbb_recent_topics.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to a member function select() on null in wp-content/plugins/phpbb-recent-topics/display/display.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/phpbb-recent-topics/admin.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

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
These attributes need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === phpbb-recent-topics === )
  • Screenshots: Screenshot #1 (The Admin interface, where you set up the magic !) image missing
The official readme.txt might help

phpbb-recent-topics/phpbb_recent_topics.php 92% from 13 tests

"phpbb_recent_topics" version 0.7.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("phpbb-recent-topics.php" instead of "phpbb_recent_topics.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected521 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP719273521

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
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%
Functions12
▷ Named functions12100.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
1 PNG file occupies 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png74.94KB29.58KB▼ 60.53%