89% ou-newsletter

Code Review | OU Newsletter

WordPress plugin OU Newsletter scored89%from 54 tests.

About plugin

  • Plugin page: ou-newsletter
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.7.3
  • WordPress version: 6.3.1
  • First release: Mar 13, 2017
  • Latest release: Mar 18, 2017
  • Number of updates: 3
  • Update frequency: every 2.7 days
  • Top authors: oleksandr87 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /459 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
Install script ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼6.39ms] Passed 4 tests

A check of server-side resources used by OU Newsletter
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0940.31 ▼4.07
Dashboard /wp-admin3.39 ▲0.0956.58 ▲1.73
Posts /wp-admin/edit.php3.44 ▲0.0952.06 ▲0.41
Add New Post /wp-admin/post-new.php5.97 ▲0.0989.53 ▼21.13
Media Library /wp-admin/upload.php3.31 ▲0.0938.48 ▼0.78

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 14 new files
Database: 2 new tables, 7 new options
New tables
wp_onnewsletters
wp_onnewsletterusers
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
jal_db_version
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by OU Newsletter
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,923 ▲17713.57 ▼0.644.90 ▲3.2540.95 ▲1.16
Dashboard /wp-admin2,219 ▲315.83 ▲0.9497.15 ▼11.2140.41 ▼1.32
Posts /wp-admin/edit.php2,102 ▲102.04 ▲0.0735.62 ▼3.1734.15 ▼3.17
Add New Post /wp-admin/post-new.php1,551 ▲1823.08 ▼0.43694.28 ▲48.8161.95 ▲3.42
Media Library /wp-admin/upload.php1,401 ▲104.21 ▼0.04100.55 ▼5.8145.47 ▼3.94

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • jal_db_version
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

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 errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (Screenshot 4) image required
Please take inspiration from this readme.txt

ou-newsletter/index.php 92% from 13 tests

The main file in "OU Newsletter" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ou-newsletter.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected1,161 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP9170221,161

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png12.27KB7.34KB▼ 40.19%
screenshot-3.png10.75KB6.17KB▼ 42.65%
screenshot-1.png7.83KB4.90KB▼ 37.35%
screenshot-4.png10.80KB6.24KB▼ 42.28%