10% mybb-last-topics

Code Review | mybb Last Topics

WordPress plugin mybb Last Topics scored10%from 54 tests.

About plugin

  • Plugin page: mybb-last-topics
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 6.3.1
  • First release: Jan 13, 2013
  • Latest release: Apr 5, 2015
  • Number of updates: 15
  • Update frequency: every 54.1 days
  • Top authors: progpars (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

10+ active /3,674 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • Install procedure had errors
    • > User deprecated in wp-includes/functions.php+5747
    Function load_plugin_textdomain was called with an argument that is deprecated since version 2.7.0 with no alternative available.

Server metrics [RAM: ▼1.97MB] [CPU: ▼56.70ms] Passed 4 tests

Analyzing server-side resources used by mybb Last Topics
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.74 ▼32.48
Dashboard /wp-admin2.05 ▼1.306.49 ▼57.34
Posts /wp-admin/edit.php2.05 ▼1.315.77 ▼44.74
Add New Post /wp-admin/post-new.php2.05 ▼3.845.81 ▼92.22
Media Library /wp-admin/upload.php2.05 ▼1.186.54 ▼28.68

Server storage [IO: ▲0.16MB] [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: 15 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_mybb_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

mybb Last Topics: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.28 ▲0.011.77 ▼0.1045.59 ▲0.63
Dashboard /wp-admin2,194 ▲145.52 ▼0.1589.34 ▼0.2382.15 ▲43.09
Posts /wp-admin/edit.php2,108 ▲81.99 ▼0.0135.68 ▼1.1834.34 ▼1.50
Add New Post /wp-admin/post-new.php1,551 ▲1623.39 ▲5.14716.56 ▲78.3056.04 ▼15.74
Media Library /wp-admin/upload.php1,411 ▲114.15 ▼0.1097.13 ▼9.2575.31 ▲28.77

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5747
    Function load_plugin_textdomain was called with an argument that is deprecated since version 2.7.0 with no alternative available.
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_mybb_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/mybb-last-topics/mybblasttopics.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/mybb-last-topics/panel_mybblasttopics.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/mybb-last-topics/mybbwidget.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (Screen shot (screenshot-1.png) in Setting page), #2 (Screen shot (screenshot-2.png) in Preview), #3 (Screen shot (screenshot-3.png) in Widget)
You can look at the official readme.txt

mybb-last-topics/mybblasttopics.php 92% from 13 tests

The entry point to "mybb Last Topics" version 1.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("mybb-last-topics.php" instead of "mybblasttopics.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin585 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP44629296
CSS200224
PO File1243565

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ 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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 PNG files occupy 0.13MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) screenshot-2.png53.24KB0.00KB▼ 100.00%
images/topic.png0.59KB0.69KB0.00%
images/bg-head.png0.13KB0.19KB0.00%
screenshot-1.png32.11KB15.41KB▼ 52.01%
screenshot-3.png47.64KB22.89KB▼ 51.95%