84% page-parts

Code Review | Page Parts

WordPress plugin Page Parts scored 84% from 54 tests.

About plugin

  • Plugin page: page-parts
  • Plugin version: 1.4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 12, 2015
  • Latest release: Mar 22, 2023
  • Number of updates: 29
  • Update frequency: every 101.1 days
  • Top authors: husobj (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active / 4,011 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼2.96ms] Passed 4 tests

A check of server-side resources used by Page Parts
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.25 ▼5.82
Dashboard /wp-admin3.35 ▲0.0547.72 ▼1.83
Posts /wp-admin/edit.php3.41 ▲0.0547.88 ▼1.50
Add New Post /wp-admin/post-new.php5.96 ▲0.07100.11 ▲5.72
Media Library /wp-admin/upload.php3.28 ▲0.0534.90 ▼2.68
Page Parts Documentation /wp-admin/admin.php?page=page-parts-documentation3.2932.58
Page Parts /wp-admin/edit.php?post_type=page-part3.3235.33

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Page Parts
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲8513.23 ▼1.361.70 ▼0.1740.83 ▼4.87
Dashboard /wp-admin2,223 ▲354.90 ▼0.98101.10 ▼1.5440.23 ▼12.22
Posts /wp-admin/edit.php2,123 ▲342.28 ▲0.2941.78 ▲2.8534.46 ▼3.94
Add New Post /wp-admin/post-new.php1,542 ▲2323.34 ▼0.00588.19 ▲1.5935.71 ▼23.66
Media Library /wp-admin/upload.php1,412 ▲274.28 ▼0.0195.79 ▼10.6642.28 ▼5.81
Page Parts Documentation /wp-admin/admin.php?page=page-parts-documentation1,0271.8627.1046.09
Page Parts /wp-admin/edit.php?post_type=page-part1,1262.2333.9227.49

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/page-parts/admin/page-parts-list-table.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/page-parts/page-parts.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_ID() in wp-content/plugins/page-parts/templates/page-part.php:26
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/page-parts/admin/page-parts-list-table.php on line 3
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/page-parts/admin/page-parts-list-table.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: cms, pages

page-parts/page-parts.php Passed 13 tests

The main file in "Page Parts" v. 1.4.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
29 characters long description:
Manage subsections of a page.

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
Success! There were no dangerous files found in this plugin1,773 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP265587901,576
Markdown2560128
JavaScript136045
CSS15024

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity29.40
▷ Minimum class complexity5.00
▷ Maximum class complexity88.00
Average method complexity3.37
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods60
▷ Static methods35.00%
▷ Public methods5591.67%
▷ Protected methods11.67%
▷ Private methods46.67%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.09MB with 0.06MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/src/Templates.fw.png93.80KB0.17KB▼ 99.82%
images/templates/default.png0.25KB0.17KB▼ 34.75%