68% opizo

Code Review | Opizo

WordPress plugin Opizo scored68%from 54 tests.

About plugin

  • Plugin page: opizo
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.9.6
  • WordPress version: 6.3.1
  • First release: May 19, 2018
  • Latest release: Jun 10, 2018
  • Number of updates: 25
  • Update frequency: every 1.0 days
  • Top authors: opizo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,691 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.24MB] [CPU: ▼3.28ms] Passed 4 tests

An overview of server-side resources used by Opizo
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2542.24 ▼1.19
Dashboard /wp-admin3.58 ▲0.2848.02 ▼7.25
Posts /wp-admin/edit.php3.63 ▲0.2752.29 ▲4.47
Add New Post /wp-admin/post-new.php6.12 ▲0.2386.81 ▼9.15
Media Library /wp-admin/upload.php3.44 ▲0.2137.02 ▲5.38
Opizo /wp-admin/admin.php?page=opizo3.4532.25
Shrinked URLs /wp-admin/admin.php?page=opizo_shrinked_urls3.4134.73
Shrink Old Posts /wp-admin/admin.php?page=opizo_old_post_shrinkener3.4532.05
Shrink Link /wp-admin/admin.php?page=opizo_shrink3.4031.62

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 57 new files
Database: 1 new table, 7 new options
New tables
wp_opizo_shrinked_urls
New WordPress options
opizo_db_version
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Opizo
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,892 ▲13513.77 ▼0.821.98 ▼0.2142.87 ▼2.54
Dashboard /wp-admin2,286 ▲955.03 ▲0.12118.54 ▲3.6586.55 ▲38.18
Posts /wp-admin/edit.php2,150 ▲612.05 ▲0.0235.46 ▲0.1530.36 ▼4.51
Add New Post /wp-admin/post-new.php6,671 ▲5,13729.52 ▲6.37875.47 ▲214.8738.98 ▼32.25
Media Library /wp-admin/upload.php1,436 ▲484.30 ▲0.17101.54 ▼2.3374.16 ▲31.78
Opizo /wp-admin/admin.php?page=opizo9671.9028.2528.65
Shrinked URLs /wp-admin/admin.php?page=opizo_shrinked_urls8461.7825.5228.86
Shrink Old Posts /wp-admin/admin.php?page=opizo_old_post_shrinkener8741.9226.9931.92
Shrink Link /wp-admin/admin.php?page=opizo_shrink8891.7326.1132.19

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie tables detected upon uninstall: 1 table
    • wp_opizo_shrinked_urls
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • opizo_db_version
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=opizo_old_post_shrinkener
    • > Notice in wp-content/plugins/opizo/admin/partials/opizo-admin-old-post-shrinkener.php+38
    Undefined offset: 0

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_var() on null in wp-content/plugins/opizo/admin/partials/opizo-admin-shrinked-urls.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/opizo/admin/partials/opizo-admin-shrink.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/opizo/admin/partials/opizo-admin-display.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/opizo/admin/partials/opizo-admin-old-post-shrinkener.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === opizo === )
You can look at the official readme.txt

opizo/opizo.php Passed 13 tests

"Opizo" version 1.2.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
62 characters long description:
Opizo Link Shortener and Make money system from Links and URLs

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
Success! There were no dangerous files found in this plugin8,792 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript211,7001,4506,561
PHP143335861,617
CSS26132425
PO File15572189

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity12.30
▷ Minimum class complexity1.00
▷ Maximum class complexity75.00
Average method complexity2.30
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes110.00%
▷ Concrete classes990.00%
▷ Final classes00.00%
Methods87
▷ Static methods44.60%
▷ Public methods7181.61%
▷ Protected methods00.00%
▷ Private methods1618.39%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants15
▷ Global constants320.00%
▷ Class constants1280.00%
▷ Public constants12100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
11 PNG files occupy 0.80MB with 0.51MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/logo-rtl.png24.44KB9.60KB▼ 60.72%
admin/images/old_post_help_fa.png67.45KB25.93KB▼ 61.56%
admin/images/icon.png4.77KB1.63KB▼ 65.83%
screenshot2.png68.07KB22.80KB▼ 66.51%
screenshot4.png108.71KB38.27KB▼ 64.80%