79% secretary

Code Review | Secretary

WordPress plugin Secretary scored79%from 54 tests.

About plugin

  • Plugin page: secretary
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jul 20, 2017
  • Latest release: Jan 29, 2022
  • Number of updates: 12
  • Update frequency: every 138.3 days
  • Top authors: ChrisBAshton (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /807 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.29MB] [CPU: ▼13.07ms] Passed 4 tests

An overview of server-side resources used by Secretary
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.79 ▲0.3340.61 ▼4.72
Dashboard /wp-admin3.63 ▲0.2952.55 ▼29.22
Posts /wp-admin/edit.php3.68 ▲0.3355.57 ▲7.05
Add New Post /wp-admin/post-new.php6.15 ▲0.2787.92 ▼15.38
Media Library /wp-admin/upload.php3.49 ▲0.2639.67 ▼2.95
Secretary /wp-admin/options-general.php?page=secretary-config3.4636.93

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 49 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Secretary
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲6013.22 ▼1.174.37 ▲2.1942.00 ▼3.50
Dashboard /wp-admin2,206 ▲155.84 ▲0.94105.74 ▼1.0235.16 ▼4.81
Posts /wp-admin/edit.php2,098 ▲62.03 ▲0.0240.32 ▲2.9734.29 ▼3.01
Add New Post /wp-admin/post-new.php6,213 ▲4,68019.12 ▼4.13983.84 ▲288.1156.20 ▼9.72
Media Library /wp-admin/upload.php1,394 ▲94.18 ▼0.01107.87 ▼12.6047.16 ▼0.41
Secretary /wp-admin/options-general.php?page=secretary-config1,0262.3644.8840.39

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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 take a closer look at the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/secretary/vendor/mustangostang/spyc/php4/5to4.php
    • > /wp-content/plugins/secretary/vendor/mustangostang/spyc/examples/yaml-load.php
  • 14× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'SecretaryRules' not found in wp-content/plugins/secretary/rules/categories.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/secretary/controllers/secretary-config.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/secretary/vendor/mustangostang/spyc/tests/DumpTest.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'SecretaryRules' not found in wp-content/plugins/secretary/rules/excerpt.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'SecretaryRules' not found in wp-content/plugins/secretary/rules/featured_image.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'SecretaryRules' not found in wp-content/plugins/secretary/rules/images.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/secretary/vendor/mustangostang/spyc/tests/IndentTest.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'SecretaryRules' not found in wp-content/plugins/secretary/rules/html_checker.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/secretary/vendor/mustangostang/spyc/tests/RoundTripTest.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'SecretaryRules' not found in wp-content/plugins/secretary/rules/links.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: validate, check, proofread, qa, secretary...

secretary/secretary.php Passed 13 tests

Analyzing the main PHP file in "Secretary" version 1.0.3
85 characters long description:
Automatic quality-assurance checks, ensuring your articles meet editorial guidelines.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin3,194 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
PHP316747272,866
YAML57234196
JSON20084
Markdown19021
CSS32116
JavaScript30011

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity21.29
▷ Minimum class complexity1.00
▷ Maximum class complexity257.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods244
▷ Static methods3012.30%
▷ Public methods19379.10%
▷ Protected methods31.23%
▷ Private methods4819.67%
Functions20
▷ Named functions945.00%
▷ Anonymous functions1155.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin