84% nine-dots-puzzle

Code Review | Nine Dots Puzzle

WordPress plugin Nine Dots Puzzle scored84%from 54 tests.

About plugin

  • Plugin page: nine-dots-puzzle
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.2
  • WordPress version: 6.3.1
  • First release: Oct 18, 2017
  • Latest release: May 11, 2020
  • Number of updates: 8
  • Update frequency: every 117.1 days
  • Top authors: mrkojo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /12,970 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

Analyzing server-side resources used by Nine Dots Puzzle
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.40 ▼0.0624.30 ▼19.41
Dashboard /wp-admin3.32 ▲0.0249.34 ▼9.01
Posts /wp-admin/edit.php3.37 ▲0.0256.44 ▲3.55
Add New Post /wp-admin/post-new.php5.90 ▲0.0294.96 ▼10.17
Media Library /wp-admin/upload.php3.25 ▲0.0239.98 ▲3.10

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Nine Dots Puzzle
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.69 ▲0.162.00 ▲0.1444.33 ▲2.09
Dashboard /wp-admin2,192 ▲215.61 ▼0.0582.94 ▼16.3842.07 ▼1.88
Posts /wp-admin/edit.php2,100 ▼32.00 ▲0.0639.69 ▲0.1236.09 ▼1.34
Add New Post /wp-admin/post-new.php1,526 ▼223.21 ▲0.21638.05 ▲0.4751.18 ▲1.57
Media Library /wp-admin/upload.php1,391 ▼94.28 ▲0.03101.69 ▼6.5442.91 ▼5.40

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/nine-dots-puzzle/nine-dots-puzzle.php:107

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 Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
8 plugin tags: think-outside-the-square, riddle, eureka, think-beyond-the-box, puzzle...

nine-dots-puzzle/nine-dots-puzzle.php Passed 13 tests

"Nine Dots Puzzle" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
51 characters long description:
The famous Nine Dots Puzzle. Think outside the box!

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
Good job! No executable or dangerous file extensions detected545 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript111035472
PHP1152773

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.05
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.40
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods5100.00%
▷ Public methods5100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin