84% oc-smart-table-free

Code Review | Plugin Name: OC Smart Table (free)

WordPress plugin Plugin Name: OC Smart Table (free) scored84%from 54 tests.

About plugin

  • Plugin page: oc-smart-table-free
  • Plugin version: 0.1.6
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9
  • WordPress version: 6.3.1
  • First release: Apr 23, 2022
  • Latest release: May 15, 2022
  • Number of updates: 13
  • Update frequency: every 1.8 days
  • Top authors: toshioc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,079 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

A check of server-side resources used by Plugin Name: OC Smart Table (free)
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0539.76 ▼3.30
Dashboard /wp-admin3.38 ▲0.0452.09 ▲3.08
Posts /wp-admin/edit.php3.50 ▲0.1052.60 ▼2.82
Add New Post /wp-admin/post-new.php5.97 ▲0.0484.81 ▼19.73
Media Library /wp-admin/upload.php3.31 ▲0.0438.97 ▲4.79

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Plugin Name: OC Smart Table (free)
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲4814.63 ▲0.276.40 ▲4.5241.67 ▼0.34
Dashboard /wp-admin2,195 ▲215.64 ▲0.0184.46 ▼12.7538.21 ▼3.82
Posts /wp-admin/edit.php2,089 ▼82.43 ▲0.4351.89 ▲16.2038.06 ▼1.27
Add New Post /wp-admin/post-new.php1,530 ▲323.18 ▲0.27686.65 ▼10.4754.36 ▲1.59
Media Library /wp-admin/upload.php1,400 ▲64.31 ▲0.13112.64 ▲5.9950.61 ▲3.92

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/oc-smart-table-free/index.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: responsive, block editor, table

oc-smart-table-free/index.php 85% from 13 tests

This is the main PHP file of "Plugin Name: OC Smart Table (free)" version 0.1.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("oc-smart-table-free.php" instead of "index.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 142 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected218 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP490151190
CSS14125
JavaScript2022
JSON1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity3.00
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.40
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions222.22%
▷ Anonymous functions777.78%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin