83% page-modified

Code Review | Page Modified

WordPress plugin Page Modified scored 83% from 54 tests.

About plugin

  • Plugin page: page-modified
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 6.3.1
  • First release: Dec 12, 2017
  • Latest release: Dec 14, 2017
  • Number of updates: 16
  • Update frequency: every 0.3 days
  • Top authors: cklosows (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 922 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼3.47ms] Passed 4 tests

This is a short check of server-side resources used by Page Modified
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0837.51 ▼7.51
Dashboard /wp-admin3.35 ▲0.0540.73 ▼10.68
Posts /wp-admin/edit.php3.49 ▲0.1449.46 ▲1.91
Add New Post /wp-admin/post-new.php5.96 ▲0.0896.08 ▲2.41
Media Library /wp-admin/upload.php3.30 ▲0.0837.52 ▲5.01
Page Modified /wp-admin/options-general.php?page=page-modified3.2730.86

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Page Modified
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,973 ▲23814.69 ▲0.453.23 ▲1.0838.12 ▼9.51
Dashboard /wp-admin2,379 ▲1945.96 ▲0.86139.77 ▲34.0653.79 ▲7.66
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0539.86 ▲3.4335.53 ▲1.41
Add New Post /wp-admin/post-new.php1,536 ▲1423.44 ▲0.05637.09 ▼36.7553.23 ▼1.23
Media Library /wp-admin/upload.php1,395 ▲74.24 ▲0.0196.75 ▼15.4840.37 ▼7.28
Page Modified /wp-admin/options-general.php?page=page-modified7832.0326.9329.02

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/page-modified/wp-page-modified.php:137
    • > PHP Fatal error
      Uncaught Error: Class 'Page_Modified_API' not found in wp-content/plugins/page-modified/includes/api/class-api-domains.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/page-modified/includes/admin/class-dashboard-widget.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Page_Modified_API' not found in wp-content/plugins/page-modified/includes/api/class-api-histories.php:8

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 86% from 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
4 plugin tags: page modified, utility, pagemodified, crawler

page-modified/wp-page-modified.php 69% from 13 tests

The principal PHP file in "Page Modified" v. 1.0.4 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("page-modified.php" instead of "wp-page-modified.php")
  • Domain Path: Please prefix the domain path with a forward slash character ("/languages")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin549 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP797222397
JavaScript17379
CSS15259
JSON10014

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity4.29
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.72
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods32
▷ Static methods39.38%
▷ Public methods2062.50%
▷ Protected methods13.12%
▷ Private methods1134.38%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin