10% take-notice

Code Review | Take Notice

WordPress plugin Take Notice scored10%from 54 tests.

About plugin

  • Plugin page: take-notice
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-3.9
  • WordPress version: 6.3.1
  • First release: Mar 27, 2011
  • Latest release: Apr 17, 2014
  • Number of updates: 16
  • Update frequency: every 69.9 days
  • Top authors: aliso (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /5,561 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • Install procedure had errors
    • > Warning in wp-content/plugins/take-notice/includes/class-take-notice-plugin.php+89
    sprintf(): Too few arguments

Server metrics [RAM: ▼1.85MB] [CPU: ▼48.64ms] Passed 4 tests

Server-side resources used by Take Notice
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.15 ▼1.329.64 ▼35.25
Dashboard /wp-admin2.17 ▼1.1811.39 ▼51.61
Posts /wp-admin/edit.php2.17 ▼1.1911.92 ▼32.08
Add New Post /wp-admin/post-new.php2.17 ▼3.7210.41 ▼75.61
Media Library /wp-admin/upload.php2.17 ▼1.0612.27 ▼23.33
Notices /wp-admin/edit.php?post_type=notice2.1710.88
Add New /wp-admin/post-new.php?post_type=notice2.1710.18

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Take Notice
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,857 ▲9613.72 ▼0.691.66 ▼0.0845.74 ▲1.33
Dashboard /wp-admin2,258 ▲785.27 ▼0.33103.83 ▲18.0445.47 ▲11.48
Posts /wp-admin/edit.php2,162 ▲622.53 ▲0.5835.68 ▼14.4935.43 ▼4.28
Add New Post /wp-admin/post-new.php1,582 ▲4723.36 ▲5.16641.92 ▲0.9536.12 ▼27.66
Media Library /wp-admin/upload.php1,470 ▲704.52 ▲0.3092.52 ▼4.6940.29 ▼5.64
Notices /wp-admin/edit.php?post_type=notice1,1192.4637.7129.45
Add New /wp-admin/post-new.php?post_type=notice3,1438.52227.3773.44

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/take-notice/includes/class-take-notice-plugin.php+89
    sprintf(): Too few arguments
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
  • 18 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=notice
    • > Warning in wp-content/plugins/take-notice/includes/class-take-notice-plugin.php+104
    sprintf(): Too few arguments
    • > GET request to /wp-admin/post-new.php?post_type=notice
    • > Notice in wp-content/plugins/take-notice/includes/class-take-notice-plugin.php+287
    Undefined variable: post
    • > GET request to /wp-admin/post-new.php?post_type=notice
    • > Notice in wp-content/plugins/take-notice/includes/class-take-notice-plugin.php+287
    Trying to get property 'post_date' of non-object

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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/take-notice/take-notice.php:40

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/edit.php?post_type=notice
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of undefined (reading 'editor')" "TypeError: Cannot read properties of undefined (reading 'editor')\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/take-notice/includes/atg-meta-box/meta-box.js?ver=0.1-alpha:10:36)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/edit.php?post_type=notice
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1 1:28721 Uncaught TypeError: Cannot read properties of undefined (reading 'editor')

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: page, notice, note, post, notification

take-notice/take-notice.php 92% from 13 tests

The main PHP script in "Take Notice" version 2.0 is automatically included on every request by WordPress
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin1,413 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
CSS313819639
PHP396181625
PO File1303780
JavaScript5102769

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity34.00
▷ Minimum class complexity18.00
▷ Maximum class complexity50.00
Average method complexity4.88
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods1270.59%
▷ Protected methods00.00%
▷ Private methods529.41%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants375.00%
▷ Class constants125.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/atg-meta-box/select2x2.png0.83KB0.77KB▼ 6.15%
includes/atg-meta-box/select2.png0.60KB0.99KB0.00%