84% one-liners

Code Review | One-liners

WordPress plugin One-liners scored 84% from 54 tests.

About plugin

  • Plugin page: one-liners
  • Plugin version: 3.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.11
  • WordPress version: 6.3.1
  • First release: Mar 17, 2015
  • Latest release: Mar 20, 2015
  • Number of updates: 6
  • Update frequency: every 0.8 days
  • Top authors: thebrent (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 748 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼2.36ms] Passed 4 tests

Server-side resources used by One-liners
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0645.39 ▲5.48
Dashboard /wp-admin3.35 ▲0.0545.82 ▼0.68
Posts /wp-admin/edit.php3.40 ▲0.0544.68 ▼5.52
Add New Post /wp-admin/post-new.php5.93 ▲0.0495.51 ▼2.90
Media Library /wp-admin/upload.php3.27 ▲0.0435.30 ▼0.35
Options /wp-admin/edit.php?post_type=thebrent_oneliners&page=thebrent_oneliners_options3.2628.15
Add New /wp-admin/post-new.php?post_type=thebrent_oneliners3.3142.46
Oneliners /wp-admin/edit.php?post_type=thebrent_oneliners3.3240.63

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

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

Browser metrics Passed 4 tests

One-liners: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲9913.61 ▼0.774.67 ▲3.0543.33 ▲2.18
Dashboard /wp-admin2,234 ▲855.83 ▲0.2395.70 ▼4.0338.48 ▼4.11
Posts /wp-admin/edit.php2,117 ▲252.01 ▲0.0237.62 ▼5.1234.56 ▼3.90
Add New Post /wp-admin/post-new.php1,568 ▲4818.37 ▼4.81635.22 ▼36.0864.02 ▲11.81
Media Library /wp-admin/upload.php1,419 ▲344.17 ▼0.0495.45 ▼12.5843.13 ▼0.75
Options /wp-admin/edit.php?post_type=thebrent_oneliners&page=thebrent_oneliners_options8062.0623.8426.79
Add New /wp-admin/post-new.php?post_type=thebrent_oneliners1,4242.5048.1650.22
Oneliners /wp-admin/edit.php?post_type=thebrent_oneliners1,0842.1130.0529.00

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
These items require your attention
  • This plugin does not fully uninstall, leaving 8 options in the database
    • thebrent_oneliners_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_thebrent_oneliners
    • can_compress_scripts
    • widget_recent-posts

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/one-liners/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/one-liners/widget.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/one-liners/widget.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: shortcodes, quotes, one liners, widgets

one-liners/oneliners.php 85% from 13 tests

The principal PHP file in "One-liners" v. 3.1.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Main file name: Name the main plugin file the same as the plugin slug ("one-liners.php" instead of "oneliners.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected203 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP33426203

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity6.50
▷ Minimum class complexity3.00
▷ Maximum class complexity10.00
Average method complexity1.55
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.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

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin