84% oberon-wpaddin

Code Review | OBERON - WP Add-in

WordPress plugin OBERON - WP Add-in scored84%from 54 tests.

About plugin

  • Plugin page: oberon-wpaddin
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.8.1
  • WordPress version: 6.3.1
  • First release: Dec 4, 2020
  • Latest release: Nov 2, 2021
  • Number of updates: 10
  • Update frequency: every 35.4 days
  • Top authors: mariomoravcik (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /509 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼0.56MB] [CPU: ▼14.94ms] Passed 4 tests

A check of server-side resources used by OBERON - WP Add-in
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1138.85 ▼0.07
Dashboard /wp-admin3.43 ▲0.1351.06 ▲5.19
Posts /wp-admin/edit.php3.54 ▲0.1946.20 ▼1.69
Add New Post /wp-admin/post-new.php3.31 ▼2.5833.63 ▼60.55
Media Library /wp-admin/upload.php3.35 ▲0.1236.65 ▲2.56
OBERON - WP Add-in /wp-admin/options-general.php?page=owpa-settings3.3441.44

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 18 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_owpa_checkinwidget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for OBERON - WP Add-in
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲1314.01 ▼0.721.72 ▼0.1043.10 ▲4.79
Dashboard /wp-admin2,205 ▲285.61 ▼0.0592.05 ▼0.9745.75 ▲5.54
Posts /wp-admin/edit.php2,107 ▲71.99 ▲0.0137.29 ▼7.5832.56 ▼8.28
Add New Post /wp-admin/post-new.php1,544 ▲723.17 ▲5.02587.42 ▼32.9049.34 ▼51.50
Media Library /wp-admin/upload.php1,407 ▲44.21 ▼0.0497.71 ▼5.2042.16 ▼2.71
OBERON - WP Add-in /wp-admin/options-general.php?page=owpa-settings9522.0525.0140.91

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_owpa_checkinwidget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/oberon-wpaddin/owpa_plugin.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/oberon-wpaddin/widgets/owpa_check_in_widget.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/oberon-wpaddin/owpa_restcontroller.php:16

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Requires php: The plugin version is formatted incorrectly
You can take inspiration from this readme.txt

oberon-wpaddin/owpa_plugin.php 92% from 13 tests

The main PHP script in "OBERON - WP Add-in" version 1.1.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("oberon-wpaddin.php" instead of "owpa_plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected2,052 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4152781,042
PHP7275355843
CSS2374167

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity12.00
▷ Minimum class complexity2.00
▷ Maximum class complexity20.00
Average method complexity2.04
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods53
▷ Static methods35.66%
▷ Public methods4075.47%
▷ Protected methods00.00%
▷ Private methods1324.53%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants428.57%
▷ Class constants1071.43%
▷ Public constants10100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin