84% ou-simple-profile

Code Review | OU SIMPLE PROFILE

WordPress plugin OU SIMPLE PROFILE scored84%from 54 tests.

About plugin

  • Plugin page: ou-simple-profile
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.2-4.4.2
  • WordPress version: 6.3.1
  • First release: Apr 6, 2016
  • Latest release: Apr 7, 2016
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: oleksandr87 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /610 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼9.91ms] Passed 4 tests

Analyzing server-side resources used by OU SIMPLE PROFILE
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0243.08 ▼4.72
Dashboard /wp-admin3.32 ▼0.0349.33 ▼18.53
Posts /wp-admin/edit.php3.37 ▲0.0149.98 ▼1.89
Add New Post /wp-admin/post-new.php5.90 ▲0.0189.15 ▼14.51
Media Library /wp-admin/upload.php3.24 ▲0.0138.44 ▲1.40

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

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

Browser metrics Passed 4 tests

A check of browser resources used by OU SIMPLE PROFILE
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,900 ▲13913.37 ▼1.348.40 ▲6.7738.47 ▼4.97
Dashboard /wp-admin2,195 ▲185.63 ▲0.0684.09 ▼18.0535.21 ▼10.24
Posts /wp-admin/edit.php2,103 ▲32.13 ▲0.1938.58 ▼4.0136.51 ▼0.68
Add New Post /wp-admin/post-new.php1,526 ▼1123.57 ▲5.40660.51 ▲2.2661.10 ▼9.10
Media Library /wp-admin/upload.php1,400 ▼04.15 ▼0.0898.08 ▼4.1943.52 ▼0.42

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
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • jal_db_version
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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
  • 9× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/ou-simple-profile/index.php:63
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_current_user_id() in wp-content/plugins/ou-simple-profile/ousimple_uploadimagedb.php:2
    • > PHP Notice
      Undefined variable: wpdb in wp-content/plugins/ou-simple-profile/main.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_current_user_id() in wp-content/plugins/ou-simple-profile/ousimple_saveinfodb.php:2
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/ou-simple-profile/main.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function mysql_result() in wp-content/plugins/ou-simple-profile/main.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_current_user_id() in wp-content/plugins/ou-simple-profile/ousimple_uploadimagedeldb.php:2
    • > PHP Notice
      Undefined index: iduser in wp-content/plugins/ou-simple-profile/search_profile.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/ou-simple-profile/search_result.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% 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
Please fix the following attributes:
  • Screenshots: Screenshot #1 (User Profile) image missing
Please take inspiration from this readme.txt

ou-simple-profile/index.php 92% from 13 tests

"OU SIMPLE PROFILE" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("ou-simple-profile.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin1,081 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP8308676887
CSS1180134
JavaScript18060

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.08
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
14 PNG files occupy 0.07MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/zip.png16.87KB8.20KB▼ 51.37%
images/me.png1.90KB1.41KB▼ 26.08%
images/mail2.png1.73KB1.50KB▼ 13.75%
images/lastname.png0.83KB0.18KB▼ 78.73%
images/skills.png1.53KB1.49KB▼ 2.56%