10% oh-authors-recent-posts-widget

Code Review | SOGO Author's Recent Posts

WordPress plugin SOGO Author's Recent Posts scored 10% from 54 tests.

About plugin

  • Plugin page: oh-authors-recent...
  • Plugin version: 1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.9.8
  • WordPress version: 5.8.1
  • First release: Dec 16, 2013
  • Latest release: Nov 6, 2018
  • Number of updates: 26
  • Update frequency: every 68.7 days
  • Top authors: orenhav (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 1,992 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/oh-authors-recent-posts-widget/plugin.php+247
    Function create_function() is deprecated

Server metrics [RAM: ▼1.89MB] [CPU: ▼183.25ms] Passed 4 tests

Server-side resources used by SOGO Author's Recent Posts
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /1.74 ▼0.985.35 ▼15.65
Dashboard /wp-admin1.76 ▼1.299.96 ▼29.81
Posts /wp-admin/edit.php1.76 ▼1.345.25 ▼36.42
Add New Post /wp-admin/post-new.php1.76 ▼3.675.34 ▼639.94
Media Library /wp-admin/upload.php1.76 ▼1.244.83 ▼26.81

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 1 new option
New WordPress options
widget_oh_author_recent_post

Browser metrics Passed 4 tests

Checking browser requirements for SOGO Author's Recent Posts
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,681 ▲8515.84 ▲0.338.79 ▲0.9745.79 ▼5.47
Dashboard /wp-admin2,975 ▲445.88 ▼0.05138.33 ▼5.70105.31 ▲0.08
Posts /wp-admin/edit.php2,738 ▼12.68 ▼0.0164.24 ▼0.2792.65 ▲2.98
Add New Post /wp-admin/post-new.php1,674 ▲17618.89 ▲0.06377.46 ▲18.05106.60 ▲5.73
Media Library /wp-admin/upload.php1,824 ▲175.01 ▼0.00160.37 ▼0.62114.15 ▲2.78

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
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/oh-authors-recent-posts-widget/plugin.php+247
    Function create_function() is deprecated
  • Zombie WordPress options detected upon uninstall: 1 option
    • widget_oh_author_recent_post

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/oh-authors-recent-posts-widget/plugin.php:29
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/oh-authors-recent-posts-widget/views/widget.php:1
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/oh-authors-recent-posts-widget/views/admin.php:3
    • > PHP Notice
      Undefined variable: r in wp-content/plugins/oh-authors-recent-posts-widget/views/widget.php on line 1

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: recent post, hebrew, author, widget, rtl

oh-authors-recent-posts-widget/plugin.php 92% from 13 tests

The primary PHP file in "SOGO Author's Recent Posts" version 1.8 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("oh-authors-recent-posts-widget.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin266 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP36670215
PO File1366149
CSS1002

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity3.12
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods450.00%
▷ Protected methods00.00%
▷ Private methods450.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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