10% section-page

Code Review | Section Page

WordPress plugin Section Page scored10%from 54 tests.

About plugin

  • Plugin page: section-page
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5.1
  • WordPress version: 6.3.1
  • First release: May 8, 2013
  • Latest release: May 17, 2013
  • Number of updates: 11
  • Update frequency: every 0.9 days
  • Top authors: Skyree (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

300+ active /5,332 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/section-page/owc-section-page.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; Owc_section_page has a deprecated constructor

Server metrics [RAM: ▲0.02MB] [CPU: ▼10.16ms] Passed 4 tests

This is a short check of server-side resources used by Section Page
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.62 ▼4.69
Dashboard /wp-admin3.32 ▲0.0248.22 ▼2.50
Posts /wp-admin/edit.php3.37 ▲0.0252.17 ▼2.23
Add New Post /wp-admin/post-new.php5.90 ▲0.0295.59 ▼30.89
Media Library /wp-admin/upload.php3.24 ▲0.0234.61 ▼2.55
Section Page /wp-admin/options-general.php?page=section-page3.2731.06

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
owc_section_pageAdminOptions
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Section Page
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,939 ▲20413.67 ▼0.949.46 ▲7.6843.88 ▲4.56
Dashboard /wp-admin2,210 ▲244.83 ▼1.09122.63 ▼12.1038.07 ▼15.22
Posts /wp-admin/edit.php2,096 ▲42.03 ▲0.0247.47 ▼9.9335.20 ▼8.68
Add New Post /wp-admin/post-new.php1,517 ▲317.48 ▼0.10663.81 ▼63.4855.78 ▲0.81
Media Library /wp-admin/upload.php1,383 ▼84.21 ▲0.03108.07 ▲3.2542.46 ▲0.02
Section Page /wp-admin/options-general.php?page=section-page1,1392.1532.5339.90

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=section-page
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=section-page
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 0% 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
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/section-page/assets/dynamic.js.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/section-page/owc-section-page-admin.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/section-page/owc-section-page.php:155

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Donate link: Invalid URI found ("")
Please take inspiration from this readme.txt

section-page/owc-section-page.php 92% from 13 tests

The entry point to "Section Page" version 1.0.2 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("section-page.php" instead of "owc-section-page.php")

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
Everything looks great! No dangerous files found in this plugin5,577 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript45684595,146
PHP32522222
CSS23021209

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity2.27
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/icon.png1.04KB0.16KB▼ 84.62%