78% page-planner

Code Review | Page Planner

WordPress plugin Page Planner scored78%from 54 tests.

About plugin

  • Plugin page: page-planner
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9.1-3.2.1
  • WordPress version: 6.3.1
  • First release: Sep 29, 2011
  • Latest release: May 18, 2014
  • Number of updates: 21
  • Update frequency: every 45.8 days
  • Top authors: dkukral (57.14%)Droyal (42.86%)jboydston (9.52%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,272 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
This plugin's installer ran successfully

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

Analyzing server-side resources used by Page Planner
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0841.31 ▲4.55
Dashboard /wp-admin3.39 ▲0.0847.49 ▼5.09
Posts /wp-admin/edit.php3.50 ▲0.1451.09 ▲4.12
Add New Post /wp-admin/post-new.php5.97 ▲0.0888.60 ▼19.61
Media Library /wp-admin/upload.php3.31 ▲0.0838.50 ▲3.34
Page Planner /wp-admin/index.php?page=page-planner/planner3.31111.59

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Page Planner
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.23 ▼1.141.75 ▲0.1245.99 ▲9.00
Dashboard /wp-admin2,212 ▲244.87 ▼0.18100.88 ▼4.1438.83 ▼3.29
Posts /wp-admin/edit.php2,095 ▲92.00 ▲0.0036.45 ▼0.4834.69 ▼2.53
Add New Post /wp-admin/post-new.php1,519 ▼023.11 ▲0.02674.67 ▲64.8659.87 ▲4.30
Media Library /wp-admin/upload.php1,394 ▲64.22 ▲0.0496.35 ▼4.7440.07 ▼3.37
Page Planner /wp-admin/index.php?page=page-planner/planner9372.3030.6632.40

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: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 201 occurences, only the last one shown
    • > GET request to /wp-admin/index.php?page=page-planner/planner
    • > Notice in wp-content/plugins/page-planner/php/planner.php+229
    Undefined index: date
    • > GET request to /wp-admin/index.php?page=page-planner/planner
    • > Notice in wp-content/plugins/page-planner/php/planner.php+107
    Undefined variable: custom_statuses
    • > GET request to /wp-admin/index.php?page=page-planner/planner
    • > Warning in wp-content/plugins/page-planner/php/planner.php+107
    Invalid argument supplied for foreach()
  • 200 occurences, only the last one shown
    • > GET request to /wp-admin/index.php?page=page-planner/planner
    • > Notice in wp-content/plugins/page-planner/php/planner.php+429
    Trying to get property 'term_taxonomy_id' 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
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/page-planner/page_planner.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add descriptions for these screenshots #1, #2, #3, #4 in page-planner/assets to your readme.txt
You can take inspiration from this readme.txt

page-planner/page_planner.php 92% from 13 tests

The main PHP script in "Page Planner" version 1.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("page-planner.php" instead of "page_planner.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin884 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP27897439
JavaScript440320299
CSS143146

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity54.00
▷ Minimum class complexity54.00
▷ Maximum class complexity54.00
Average method complexity3.94
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants450.00%
▷ Class constants450.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected