84% lamboz-latest-post-widget

Code Review | Lamboz Latest Post Widget

WordPress plugin Lamboz Latest Post Widget scored 84% from 54 tests.

About plugin

  • Plugin page: lamboz-latest-pos...
  • Plugin version: 0.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.0-5.3.1
  • WordPress version: 6.3.1
  • First release: Dec 17, 2019
  • Latest release: Dec 24, 2019
  • Number of updates: 5
  • Update frequency: every 1.4 days
  • Top authors: lambozgroup (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 444 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼7.30ms] Passed 4 tests

Server-side resources used by Lamboz Latest Post Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.83 ▼3.51
Dashboard /wp-admin3.35 ▲0.0444.46 ▼9.12
Posts /wp-admin/edit.php3.40 ▲0.0451.62 ▲3.60
Add New Post /wp-admin/post-new.php5.93 ▲0.0486.49 ▼16.08
Media Library /wp-admin/upload.php3.27 ▲0.0436.79 ▼0.50

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_my_custom_widget
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Lamboz Latest Post Widget: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6713.24 ▼1.121.63 ▼0.1240.72 ▼7.12
Dashboard /wp-admin2,206 ▲215.79 ▲0.8996.64 ▼13.5339.27 ▼3.46
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0437.34 ▲1.6934.34 ▲1.07
Add New Post /wp-admin/post-new.php1,542 ▲2223.00 ▼0.12647.61 ▼1.3255.16 ▲2.96
Media Library /wp-admin/upload.php1,385 ▼34.23 ▲0.0393.99 ▼14.1642.77 ▼2.47

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_my_custom_widget
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Please take a closer look at the following
  • 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/lamboz-latest-post-widget/lamboz.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/lamboz-latest-post-widget/class-lamboz-widgets.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/lamboz-latest-post-widget/includes/class-lamboz-widgets.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: widget, latest post, custom latest post, latest post plugin

lamboz-latest-post-widget/lamboz.php 85% from 13 tests

The principal PHP file in "Lamboz Latest Post Widget" v. 0.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("lamboz-latest-post-widget.php" instead of "lamboz.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin348 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP31831324
CSS11324

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity21.00
▷ Minimum class complexity21.00
▷ Maximum class complexity21.00
Average method complexity6.00
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected