10% org-frontpage

Code Review | Organisation Frontpage

WordPress plugin Organisation Frontpage scored10%from 54 tests.

About plugin

  • Plugin page: org-frontpage
  • Plugin version: 2.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.2
  • WordPress version: 6.3.1
  • First release: Nov 27, 2016
  • Latest release: May 6, 2023
  • Number of updates: 36
  • Update frequency: every 65.4 days
  • Top authors: bgin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /2,114 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/org-frontpage/org-frontpage.php+64
    Trying to get property 'post_parent' of non-object

Server metrics [RAM: ▼1.82MB] [CPU: ▼52.13ms] Passed 4 tests

An overview of server-side resources used by Organisation Frontpage
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.17 ▼1.3010.41 ▼32.83
Dashboard /wp-admin2.19 ▼1.1212.30 ▼40.92
Posts /wp-admin/edit.php2.19 ▼1.1713.32 ▼42.75
Add New Post /wp-admin/post-new.php2.19 ▼3.7011.94 ▼92.03
Media Library /wp-admin/upload.php2.19 ▼1.0414.24 ▼24.71
Org Frontpage /wp-admin/options-general.php?page=org-frontpage-menu2.1911.32

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Organisation Frontpage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.72 ▲0.101.87 ▲0.1142.52 ▲0.65
Dashboard /wp-admin2,199 ▲225.51 ▼0.11100.29 ▲10.0448.85 ▲3.11
Posts /wp-admin/edit.php2,117 ▲172.00 ▼0.0137.91 ▼0.9439.48 ▲2.91
Add New Post /wp-admin/post-new.php6,341 ▲4,80525.98 ▲7.64978.23 ▲339.8963.97 ▼9.89
Media Library /wp-admin/upload.php1,407 ▲44.11 ▼0.08118.66 ▲16.8248.13 ▲5.32
Org Frontpage /wp-admin/options-general.php?page=org-frontpage-menu1,0572.0030.1237.22

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/org-frontpage/org-frontpage.php+64
    Trying to get property 'post_parent' of non-object
  • Zombie WordPress options were found after uninstall: 8 options
    • ofp_nb_posts_lead
    • ofp_nb_posts_frontpage
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=org-frontpage-menu
    • > Notice in wp-content/plugins/org-frontpage/org-frontpage.php+64
    Trying to get property 'post_parent' of non-object

SRP 50% 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
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/org-frontpage/org-frontpage.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_posts() in wp-content/plugins/org-frontpage/org-frontpage-plugin-admin.php:24

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: front page, theme, magazine, posts, themes...

org-frontpage/org-frontpage.php Passed 13 tests

The main PHP file in "Organisation Frontpage" ver. 2.0.6 adds more information about the plugin and also serves as the entry point for this plugin
77 characters long description:
Adding a meta box in the post editor to set the rank of post in the home page

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
No dangerous file extensions were detected417 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP27394338
PO File1252679

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity41.00
▷ Minimum class complexity41.00
▷ Maximum class complexity41.00
Average method complexity4.64
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods1090.91%
▷ Protected methods00.00%
▷ Private methods19.09%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected