84% acf-page-grandchildren

Code Review | ACF Page Grandchildren

WordPress plugin ACF Page Grandchildren scored84%from 54 tests.

About plugin

  • Plugin page: acf-page-grandchi...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-6.1
  • WordPress version: 6.3.1
  • First release: Aug 27, 2016
  • Latest release: Nov 2, 2022
  • Number of updates: 11
  • Update frequency: every 205.6 days
  • Top authors: navzme (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,389 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.96ms] Passed 4 tests

Analyzing server-side resources used by ACF Page Grandchildren
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0243.13 ▲2.13
Dashboard /wp-admin3.32 ▼0.0250.11 ▼19.32
Posts /wp-admin/edit.php3.37 ▲0.0253.61 ▲5.33
Add New Post /wp-admin/post-new.php5.90 ▲0.0294.48 ▼10.05
Media Library /wp-admin/upload.php3.24 ▲0.0236.16 ▼0.58

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for ACF Page Grandchildren
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.29 ▼1.351.69 ▼0.1143.32 ▼1.99
Dashboard /wp-admin2,221 ▲184.84 ▼0.0796.89 ▼9.7041.17 ▼0.09
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0241.22 ▲4.3837.48 ▲2.47
Add New Post /wp-admin/post-new.php1,534 ▼623.05 ▼0.14677.22 ▲5.1460.64 ▲8.71
Media Library /wp-admin/upload.php1,400 ▼04.29 ▲0.01115.50 ▲11.3747.69 ▲1.49

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/acf-page-grandchildren/acf-page-grandchildren.php
    • > /wp-content/plugins/acf-page-grandchildren/index.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
10 plugin tags: advanced, custom, page, acf, grand...

acf-page-grandchildren/acf-page-grandchildren.php Passed 13 tests

"ACF Page Grandchildren" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
63 characters long description:
A great way to show group of fields only on grandchildren pages

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin59 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2142559

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity4.25
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.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
No PNG files were detected