78% not-sure

Code Review | Not Sure

WordPress plugin Not Sure scored78%from 54 tests.

About plugin

  • Plugin page: not-sure
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.3.1
  • WordPress version: 6.3.1
  • First release: Jun 4, 2015
  • Latest release: Oct 7, 2015
  • Number of updates: 9
  • Update frequency: every 14.0 days
  • Top authors: softpill.eu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /603 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼3.95ms] Passed 4 tests

Analyzing server-side resources used by Not Sure
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0337.70 ▼0.20
Dashboard /wp-admin3.40 ▲0.0944.38 ▼7.30
Posts /wp-admin/edit.php3.45 ▲0.0946.30 ▼1.02
Add New Post /wp-admin/post-new.php5.98 ▲0.0985.64 ▼7.29
Media Library /wp-admin/upload.php3.32 ▲0.0939.19 ▲3.73
Not Sure Buttons /wp-admin/admin.php?page=sp_ns_forms3.2835.57
About /wp-admin/admin.php?page=sp_ns_about3.2930.27

Server storage [IO: ▲0.07MB] [DB: ▲0.77MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Not Sure: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲8013.17 ▼1.581.60 ▲0.0437.67 ▲2.38
Dashboard /wp-admin2,235 ▲495.89 ▲1.0198.72 ▼5.3436.10 ▼3.54
Posts /wp-admin/edit.php2,115 ▲232.05 ▲0.0535.96 ▼3.1832.42 ▼2.41
Add New Post /wp-admin/post-new.php1,555 ▲4123.53 ▲6.03613.36 ▼11.6655.30 ▼2.66
Media Library /wp-admin/upload.php1,411 ▲204.24 ▼0.0295.18 ▼1.7541.19 ▼3.30
Not Sure Buttons /wp-admin/admin.php?page=sp_ns_forms9242.0424.5927.05
About /wp-admin/admin.php?page=sp_ns_about8202.0525.3325.64

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% 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 no errors were found, this is by no means an exhaustive test

SRP 0% 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
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/not-sure/css/sp_ns.css.php
    • > /wp-content/plugins/not-sure/js/sp_ns.js.php
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/not-sure/includes/notsure.records.php on line 19
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/not-sure/includes/notsure.records.php on line 19
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/not-sure/includes/notsure.records.php on line 19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/not-sure/includes/notsure_frontend.php:72
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/not-sure/includes/notsure_admin.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/not-sure/notsure.php:27
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/not-sure/notsure.php on line 26

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: comments, customer not sure, ask a question

not-sure/notsure.php 92% from 13 tests

"Not Sure" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("not-sure.php" instead of "notsure.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
Good job! No executable or dangerous file extensions detected1,541 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP101942501,538
HTML1003

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity28.00
▷ Minimum class complexity7.00
▷ Maximum class complexity49.00
Average method complexity3.16
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods25
▷ Static methods00.00%
▷ Public methods25100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/close.png1.54KB1.07KB▼ 30.65%