72% thinkery

Code Review | Thinkery

WordPress plugin Thinkery scored72%from 54 tests.

About plugin

  • Plugin page: thinkery
  • Plugin version: 0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.5
  • WordPress version: 6.3.1
  • First release: Feb 3, 2019
  • Latest release: Aug 5, 2020
  • Number of updates: 4
  • Update frequency: every 139.5 days
  • Top authors: akirk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /740 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.23MB] [CPU: ▼1.36ms] Passed 4 tests

An overview of server-side resources used by Thinkery
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2340.92 ▲0.07
Dashboard /wp-admin3.53 ▲0.2347.48 ▲0.88
Posts /wp-admin/edit.php3.64 ▲0.2946.07 ▲0.92
Add New Post /wp-admin/post-new.php6.11 ▲0.2285.70 ▼7.32
Media Library /wp-admin/upload.php3.45 ▲0.2236.15 ▲2.09
Tags /wp-admin/edit-tags.php?taxonomy=thinkery_tag&post_type=thinkery_thing3.4434.37
All Things /wp-admin/edit.php?post_type=thinkery_thing3.4938.57
Save URL /wp-admin/edit.php?post_type=thinkery_thing&page=thinkery-save-url3.4129.56
Settings /wp-admin/edit.php?post_type=thinkery_thing&page=thinkery-settings3.4232.78
Add New /wp-admin/post-new.php?post_type=thinkery_thing3.5750.79

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 103 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Thinkery
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,859 ▲12413.28 ▼0.981.78 ▼0.4543.13 ▲2.21
Dashboard /wp-admin2,252 ▲665.86 ▲0.91100.11 ▼10.8039.63 ▼1.79
Posts /wp-admin/edit.php2,138 ▲702.02 ▲0.0038.38 ▲1.8030.70 ▼3.03
Add New Post /wp-admin/post-new.php1,563 ▲3023.22 ▲0.06596.06 ▼87.3356.04 ▲2.12
Media Library /wp-admin/upload.php1,431 ▲404.21 ▲0.0497.58 ▼2.8341.77 ▼4.81
Tags /wp-admin/edit-tags.php?taxonomy=thinkery_tag&post_type=thinkery_thing1,3132.1427.7127.19
All Things /wp-admin/edit.php?post_type=thinkery_thing1,1071.9330.5331.01
Save URL /wp-admin/edit.php?post_type=thinkery_thing&page=thinkery-save-url8042.0324.2324.63
Settings /wp-admin/edit.php?post_type=thinkery_thing&page=thinkery-settings8052.1824.5724.27
Add New /wp-admin/post-new.php?post_type=thinkery_thing2,3487.60168.6863.67

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 25% 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/edit.php?post_type=thinkery_thing&page=thinkery-save-url
    • > Notice in wp-content/plugins/thinkery/templates/admin/save-url.php+16
    Undefined variable: url

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
Please fix the following
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/thinkery/templates/thinkery/header/sidebar.php
    • > /wp-content/plugins/thinkery/templates/importer/footer.php
    • > /wp-content/plugins/thinkery/templates/thinkery/list/no-thing.php
  • 19× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/thinkery/templates/thinkery/list/thing.php:9
    • > PHP Notice
      Trying to get property 'query' of non-object in wp-content/plugins/thinkery/templates/thinkery/header/sidebar.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_footer() in wp-content/plugins/thinkery/templates/thinkery/footer.php:10
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/thinkery/templates/thinkery/header/sidebar.php on line 159
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/thinkery/templates/admin/settings.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/thinkery/templates/admin/save-url.php:9
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/thinkery/templates/thinkery/header/sidebar.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/thinkery/templates/importer/step0.php:2
    • > PHP Notice
      Undefined variable: active in wp-content/plugins/thinkery/templates/thinkery/list/thing.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'Thinkery' not found in wp-content/plugins/thinkery/templates/thinkery/things.php:8

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 93% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Screenshots: Add an image for screenshot #1 (The thinkery frontend.)
The official readme.txt might help

thinkery/thinkery.php 92% from 13 tests

The main file in "Thinkery" v. 0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages/" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected6,635 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript67532574,500
PHP233308112,044
Markdown113057
XML14214
SVG10011
CSS62579

PHP code Passed 2 tests

A short 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.49
Average class complexity46.50
▷ Minimum class complexity2.00
▷ Maximum class complexity230.00
Average method complexity5.55
▷ Minimum method complexity1.00
▷ Maximum method complexity65.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods80
▷ Static methods33.75%
▷ Public methods6682.50%
▷ Protected methods78.75%
▷ Private methods78.75%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
58 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/sprite/kbd.png0.87KB1.31KB0.00%
img/sprite/icn_public.png0.18KB0.12KB▼ 32.97%
img/sprite/icn_edit_hover.png0.19KB0.14KB▼ 28.93%
img/sprite/icn_permalink_hover.png0.18KB0.12KB▼ 32.07%
img/sprite/icn_list_shared.png0.57KB0.49KB▼ 14.16%